• Skip to main content
  • Skip to after header navigation
  • Skip to site footer

Free-Mail

  • Events
  • Images
    • Instagram Goodness
  • Music
  • News
  • Software

Using Bash traps in your scripts

Using Bash traps in your scripts: Hands programming

It’s easy to detect when a shell script starts, but it’s not always easy to know when it stops. A script might end normally, just as its author intends it to end, but it could also fail due to an unexpected fatal error. Sometimes it’s beneficial to preserve the remnants of whatever was in progress when a script failed, and other times it’s inconvenient. Either way, detecting the end of a script and reacting to it in some pre-calculated manner is why the Bash trap directive exists.

read more: Opensource.com sethkenlon

Supporting Open Source.

Have you tried: Visiting Port Elizabeth?

Share this:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Pinterest (Opens in new window) Pinterest
  • Email a link to a friend (Opens in new window) Email
  • More
  • Share on Tumblr (Opens in new window) Tumblr
  • Print (Opens in new window) Print
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Reddit (Opens in new window) Reddit
Published on 29 June 2020 by Alan Category: SoftwareTag: Bash, Scripts, traps, Using

Cool JC159 – Rio to Cape Town image

Check out this Cape Town image: JC159 – Rio to Cape Town Image by Captain Smurf RRS James Cook …

Read moreCool JC159 – Rio to Cape Town image

Shoppers see ‘a reduction in fine lines in two weeks’ with £21 nightcream loved by Imogen Thomas

TV presenter Imogen Thomas has been sharing her skincare must-haves, including her go-to ‘very …

Read moreShoppers see ‘a reduction in fine lines in two weeks’ with £21 nightcream loved by Imogen Thomas

WI Bloody Mary Concerts presents Brett Newski

WI Bloody Mary Concerts presents Brett Newski – a Africa interest event taking place on …

Read moreWI Bloody Mary Concerts presents Brett Newski

About Alan

Previous Post:Nice Sunset over Strand photo
Next Post:Pacifica Quartet – Mill Valley Chamber Music Society

Reach Trust

Reach Trust is a holding trust for a number of companies within the Stratlec Group.

Copyright © 2026 · Free-Mail · All Rights Reserved · Powered by Straton Electrical

Back to top