BTS

Message1790

Author ft
Recipients mika, z3ttacht
Date 2009-01-31.16:03:09
Content
Alexander Steinböck <bts@bts.grml.org>:
> -if [[ $1 == '-force' ]]; then
> +if [ $1 = '-force' ]; then

Nevermind my previous ACK...

[snip]
# foo.sh
[ $1 = -force ] && echo yay || echo nay
[snap]

% ./foo.sh
[: 1: =: unexpected operator
nay

So, NACK.
I'm all for more quoting.
Always quote variables in POSIX scripts unless you *really* know what
you're doing.

Regards, Frank
History
Date User Action Args
2009-01-31 16:03:09ftsetrecipients: + z3ttacht
2009-01-31 16:03:09ftlinkissue606 messages
2009-01-31 16:03:09ftcreate