Bash and Perl
Bash and Perl
Posted Oct 2, 2014 14:59 UTC (Thu) by gwolf (subscriber, #14632)In reply to: dash/ash by ibukanov
Parent article: Bash gets shellshocked
I do argue (see my above comment) for the utility of some sorts of bashisms, particularly those that help forked process' control and quoting (another favorite of mine is to use $() instead of ``, as it's *way* clearer. I won't argue for using Bash when you use arrays and local scopes — That's a clear indication you should switch to a real programming language. One that, between many other things, separates parsing/compiling from executing, because your program will most likely be complex enough to warrant it!
But yes, people complain about Perl being write-only. Bash constructs and mindset are way worse than Perl.
Posted Oct 2, 2014 15:38 UTC (Thu)
by madscientist (subscriber, #16861)
[Link]
As others have pointed out, if you want to write bash scripts that's fine and it's trivial to do: just start your script with #!/bin/bash. If you want to write POSIX shell scripts, start your script with #!/bin/sh. If you use #!/bin/sh and you use bash-isms, your script is simply wrong.
Bash and Perl