Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For `set -u` I mostly agree. For `set -e` see my comment below and Greg's wiki: http://mywiki.wooledge.org/BashFAQ/105


> and they still fail to catch even some remarkably simple cases

I totally agree. Although I'd say that there isn't anything "remarkably simple" about writing a bash script. Anything in the shell scripting world that seems remarkably simple is just because one hasn't realised the ghosts and horrors that lurk in the shadows.

But I'll use -e anytime. It feels like having a protective proton pack at least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: