Re: script question


Subject: Re: script question
From: Quant-X UNIX and Linux Support (lists@quant-x.com)
Date: Thu Sep 16 1999 - 00:40:56 PDT


On Wed, Sep 15, 1999 at 11:07:19AM -0700, Dave Wiard wrote:
> this really isn't Alpha specific, but maybe someone could clue me in.
> why might this _always_ evaluate the if and never touch the else:
>
> if [ $(($#<1)) ]
> then
> multiple lines of code
> else
> multiple lines of code
> fi

Because $(($#<1)) returns a string. Why don't you just use:
    [ $# -lt 1 ]
if I was able to guess the point.

Ciao.

-- 

Dejan Muhamedagic UNIX and Linux Support

Quant-X Service & Ph: (+43) 4212 90555-0 Consulting Ges.m.b.H. Fax: (+43) 4212 90555-20 http://www.quant-x.com Email: support@quant-x.com

-- To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



This archive was generated by hypermail 2a22 : Mon Oct 04 1999 - 12:44:56 PDT