Re: script question
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
Reply to: