Article 55678 LXer: Using Bash traps in your scripts

LXer: Using Bash traps in your scripts

by
LXer
from LinuxQuestions.org on (#55678)
Published at LXer:

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

Read More...latest?d=yIl2AUoC8zA latest?i=21aVjWO6b8U:AzhYVDfqDE8:F7zBnMy latest?i=21aVjWO6b8U:AzhYVDfqDE8:V_sGLiP latest?d=qj6IDK7rITs latest?i=21aVjWO6b8U:AzhYVDfqDE8:gIN9vFw21aVjWO6b8U
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments