This should work

if [ $numb -ge "3"  -a   $numb -le "10" ]
then
        echo "Got here"
else
        echo "condition failed"
fi


-- Aravind


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Shrestha
Sent: Wednesday, 12 January 2000 03:06
To: [EMAIL PROTECTED]
Subject: [SLUG] if else


In shell programming in linux, if I want to do something if the number
is 3 then I can write

if [$numb ="3"]
then
echo "hello"
fi

But if I have to write a condition "greater that 3 and less than 10",
how do I write it?

Any help will be highly appreciated!!!

Shr

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to