[sclug] sclug Digest, Vol 67, Issue 11

Graham Swallow lists at information-cascade.co.uk
Fri Apr 24 00:29:30 UTC 2009


Why do people still do this.
Which shell still cannot handle an empty string?
Which manufacturer ships it?
Come on, name names.

if [ "x$1" = "x" ]; then
...

if [ "$1" = "" ]; then

Try this in a file, with bash ksh pdksh ....
If it fails, ask for your money back

blnk=""
if [ "$blnk" = "" ]
then
        echo same
else
        echo diff
fi

Graham



More information about the Sclug mailing list