On Saturday, July 05, 2014 08:51:05 AM Patrick Schleizer wrote:
> How (in)sane would it be to add something like
>
> bash -n "$0" || exit 1
>
> to the beginning of bash scripts to have some basic syntax checking?
I don't think including it in the script helps much. You might want to avoid
using $0. http://mywiki.wooledge.org/BashFAQ/028
> Any other advise for automatic syntax check?
There are linters. Try http://www.shellcheck.net/
--
Dan Douglas