Aaron Maxwell personal blog

“Exit traps” can make your Bash scripts more robust and reliable (2013)

There is a simple, useful idiom to make your bash scripts more robust - ensuring they always perform necessary cleanup operations, even when something unexpected goes wrong. The secret sauce is a pseudo-signal provided by bash, called EXIT, that you can trap ; commands or functions trapped on it will execute when the…
Points
591
HN comments
186
Submissions
2
Cited by
0 commenters

Software Engineering2023

On Hacker News

SubmittedTitle on HNPointsComments
Jun 20, 2023“Exit traps” can make your Bash scripts more robust and reliable (2013) by ekiauhce591148
Jan 13, 2018How “Exit Traps” Can Make Bash Scripts More Robust and Reliable by striking15838

More from Aaron Maxwell

All 2 posts →

Related posts from the same era