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

"bash -e" has much the same effect: it basically exits on the first failed command, with considerations for pipelines, conditionals and the like.

http://www.gnu.org/software/bash/manual/bashref.html#index-s...



Note this recent discussion about bash -e, including my post that "the disappointment with set -e is that it does not work everywhere".

https://news.ycombinator.com/item?id=8054440


It's nice to have, but I wouldn't rely on it to save me - it's no replacement for checking return codes properly.


Certainly, but it's a good habit to get into, like ``use strict`` in Perl.


"Perl and line noise are distinguishable. Properly written perl starts with 'use strict'; line noise rarely does."




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

Search: