Re:ShellCheck: a static analysis and linting tool for sh/bas...
by rcthompson on Sunday December 21, 2014 @01:33AM
(#8779135)
My approach to bashisms is to put "#/bin/bash" on the first line unless I'm specifically trying to avoid them. It acts as a declaration of "yes I'm using bash, there are probably bashisms in this code".
[ Parent
| on HN ]
Re:ShellCheck: a static analysis and linting tool for sh/bas...
by SwellJoe on Sunday December 21, 2014 @04:15AM
(#8779345)
That kinda defeats the purpose of my scripts, which are written in sh in order to run on any of our supported systems without any need to install any dependencies first. We can know that there will be a POSIX compatible sh on every system we support.
If I'm willing to make uses install something first (i.e. if it is used after an installation script runs rather than during), I build it in Perl.