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

I start bash scripts, by setting the holy trinity: set -eou

That prevents end-of-the-world scenario like the one above, if the script derails.



Maybe also add "pipefail" to the end of that?


Haha right, I feel like these should always be popularized as `set -eu` and `set -o pipefail` rather than making it look like you an `set pipefail`. I wonder if that chap has been uselessly printing options at the beginning of scripts for a while now.


alias rm='rm --no-preserve-root'




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: