Sander van Dijk --> dwm (2007-05-13 11:52:17 +0200): > On 5/13/07, Jukka Salmi <[EMAIL PROTECTED]> wrote: >> To be compatible with old shells you should be careful when test(1)ing >> a potentially unset or empty variable; i.e. use `test x$var != x' >> instead of `test $var'. > > Wouldn't `test "$var"' work as well?
I've been told that there are shells which even get this wrong, leaving `test x$var ...' as the only portable way... But I've never used such a shell myself, though. Regards, Jukka -- bashian roulette: $ ((RANDOM%6)) || rm -rf ~
