Hacker News new | past | comments | ask | show | jobs | submit login




Some of these are programmer errors though. Quote everything is known best practice for bash, vim lints unquoted variable expansion as red. Also bash scripts frequently interact with the FS so it's no surprise that some bugs remove files that are not meant to be removed. I think "set -o nounset" would stop the RHEL bug, although it's not clear if the variable is unset or really just an empty string.

I don't want to protect bash though, but teaching bash scripting best practices would be nice. I learned these options from this site:

http://kvz.io/blog/2013/11/21/bash-best-practices/




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: