The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Simple Script
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Forum Rules
FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
Simple Script
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
5
(
permalink
)
05-11-2008
ragavhere
Registered User
Join Date: Apr 2008
Location: Chennai,India
Posts: 69
Hi try this code in bash,
read M
read R
read T
A=`expr $M + $R + $T`
B=2000
if [ "$A" -gt "$B" ]; then
echo "A is greater than 2000"
elif [ "$A -lt "$B ];
echo "A is less than 2000"
elif [ "$A" = "$B" ]; then
eho "A is equal to 2000"
fi
ragavhere
View Public Profile
Find all posts by ragavhere