Operating System Shell Scripting/Programs on Linux
Linux Shell Scripting programs
Sunday, 17 June 2012
Write a shell script to find greatest of two. Script must consider the case where two numbers are equal
read a;
read b;
if [ $a = $b ]
then
echo both are equal;
elif [ $a -gt $b ]
then
echo $a is greater;
else
echo $b is greater;
fi
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment