Hacker News new | ask | show | jobs
by oblio 4171 days ago
I doubt it. set -e is POSIX, I think, but the rest are probably bash extensions.

I'll probably get flak for this, but for 99% of the scripts, at this point I'd just use bash. Linux has it as a default, as does Mac OS, anyone running BSDs can install it trivially, and Unixes probably have it as well since most of them have antiquated CLI environments and administrators usually install GNU utils to have a more human working environment.

1 comments

See here:

http://pubs.opengroup.org/onlinepubs/009695399/utilities/set...

"-u The shell shall write a message to standard error when it tries to expand a variable that is not set and immediately exit. An interactive shell shall not exit."