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 <[email protected]> wrote: > On 26 October 2011 14:51, Peter John Hartman <[email protected]> > wrote: >> I do something similar: >> >> if [[ $foo != "" ]]; then > > [ -n "$foo" ] > > if you're going for POSIX. >
