I think [ "$foo" ] will work too. No need for -n. But yeah. Bashisms did lot of brain damage
On 26/10/2011, at 20:09, Rob <robpill...@gmail.com> wrote: > On 26 October 2011 14:51, Peter John Hartman <peterjohnhart...@gmail.com> > wrote: >> I do something similar: >> >> if [[ $foo != "" ]]; then > > [ -n "$foo" ] > > if you're going for POSIX. >