smoser.github.io

Today I learned: set -e sucks even more. (opens in new tab)

Today I learned: set -e sucks even more. Summary: Just don’t use set -e. I’ve never been a fan “errexit” in shell. You’ve probably seen this as set -e, or set -o errexit or sh -e. People write lists of shell commands in a file and want the script to exit on the first one that fails rather than barreling on and causing damage. That seems sane. I’ve always strived to write “shell programs” rather than “shell scripts”. The difference being that the program will clean up after itself and give san...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help