Glenn Fowler wrote:
[ x$install = xyes ] && ...
or use the ksh93 [[ ... ]]
[[ $install == yes ]] && ...
Or even
[[ ${install:-no} == yes ]]
why complicate $install to ${install:-no} ?
Just because ;-)
Actually, because it will still work correctly even if the -u flag is set:
$ ksh -eu '[[ $foo == bar ]]'
ksh: foo: parameter not set
$ ksh -eu '[[ ${foo:-no} == bar ]]'
--
Alan Burlison
--
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code