News for hackers. Stuff that matters.
Re:Better bash in 15 minutes by mturmon on Wednesday April 16, 2014 @08:07PM (#7601320)
One drawback with this is that if you, or someone, does

  % bash script.sh
to run your script, then the shebang line will never be seen, and your script will run with -e off. If the "set -e" is explicitly given, this won't happen.

As you can guess, I've done this by mistake. One case is after transferring or unarchiving files where execute flags get turned off by mistake. Or using utilities, like job schedulers, that are tricky in whether they run the script as an executable, or via a shell interpreter.

There are no comments on this comment yet.