• 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

Bursaries: The missing link in your B-BBEE spend

Sean Sharp, the Executive Head of Sales at EduPower Skills Academy January and February can be some …

Read moreBursaries: The missing link in your B-BBEE spend

REFF – workshop at Goldsmiths University of London, Feb. 15th 2011

A nice WordPress Plugin image: REFF – workshop at Goldsmiths University of London, Feb. 15th …

Read moreREFF – workshop at Goldsmiths University of London, Feb. 15th 2011

Ka’ahumanu Stone

A nice Kings Beach image: Ka’ahumanu Stone Image by Tatiana12 This stone also received its …

Read moreKa’ahumanu Stone

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