Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.


  Search this Thread
Old 06-29-2020, 07:49 PM   #1
LXer NewsBot
Registered: Dec 2005
Posts: 110,687

Rep: Reputation: 117Reputation: 117
LXer: Using Bash traps in your scripts

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 more



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] About Traps in bash script ddenial Linux - Newbie 6 05-14-2020 12:47 AM
LXer: Microsoft Putting Patent Traps Inside Linux While Blackmailing Companies Using Patents Associated With These Traps LXer Syndicated Linux News 0 07-11-2019 04:06 PM
LXer: How to modify scripts behavior on signals using bash traps LXer Syndicated Linux News 0 10-25-2017 08:01 AM
Using SNMP Traps jiml8 Linux - Server 4 04-15-2009 11:29 AM
LXer: Using Traps Outside Of Shell Scripts On Unix Or Linux LXer Syndicated Linux News 0 07-09-2008 07:41 AM > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration