Pages

Text

Recent Articles

Nike Sports

Ads 468x60px

Recent Posts

Google Plus

Download

Thursday, 12 April 2012

Write a shell script to read a number from user and check whetherhe message numm the number is less than or equal to 99, if it is less than 99 then display the message number is less than 99 otherwise number is greater.

#! /bin/sh
# Write a shell script to read a number from user and check whetherhe message numm the number is less than or equal to 99, if it is less than 99 then display the message number is less than 99 otherwise number is greater.
echo "Enter the number "
read number
if test $number -le 99
then
echo "The entered number is less than or equal to 99 "
else
echo "The number is greater than 99 "
fi

0 comments:

Post a Comment