On Thu, Jul 16, 2015 at 11:32 AM, Evan Gates <[email protected]> wrote:
> A few notes on using sh.
Oh and one more I missed. You have
make $@
which should be
make "$@"
in order to maintain proper arguments. (In general there should never
be an unquoted expansion/substitution. There are a few acceptable uses
in POSIX sh as it doesn't support arrays.)
For example, notice how unquoted incorrectly expands to 3 parameters
instead of 2:
$ f() { printf '<%s>' $@; echo; printf '<%s>' "$@"; echo; }
$ f foo 'bar baz'
<foo><bar><baz>
<foo><bar baz>
-emg