[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/shells management



On Sun, Sep 07, 2003 at 06:08:06PM +0200, Thomas Hood wrote:
> On Sun, 2003-09-07 at 17:23, Branden Robinson wrote:
> > Man, that's ugly.  I use:
> > 
> > if [ -n "$var" ]; then
> > fi

> I have been using
> 
>     if [ "$var" ]; then
>     fi

> I hope that's kosher too; otherwise I have a few scripts to fix.

In general, no.  If the contents of $var are a test operator, you'll get
a syntax error.

-- 
Steve Langasek
postmodern programmer

Attachment: pgpnaxldbPuM_.pgp
Description: PGP signature


Reply to: