############################################################
# Name: sy_5
#
#
# Usage: ./sy_5
#
# Author: Suresh Yadagiri
# Date: August 06,2010
#
# Requirements:
# write a script that takes two integer command line arguments.the script
# displays the numbers between the two integer (including
# the number) in asscending order if the first number is
# smaller than the second and in descending order if the
# first number is greater than the second. Name the script
# count_up_down
#
############################################################
function printusageinfo(){
echo -e "\nUsage: $0
}
function is_integer() {
printf "%d" $1 > /dev/null 2>&1
return $?
}
if [ $# -eq 0 ]
then
echo "Two arguments expected"
printusageinfo
exit 1
fi
if [ $# -gt 3 ]
then
echo "Too many arguments "
printusageinfo
exit 1
fi
if ! is_integer $1 -o ! is_integer $2;
then
echo -e "\nInteger arguments expected"
printusageinfo
exit 1
fi
number1=$1
number2=$2
#echo " $number1 $number2"
if [ $number1 -lt $number2 ]
then
until [ $number1 -eq $number2 ]
do
echo " $number1 "
number1=`expr $number1 + 1`
done
echo " $number1 "
exit 0
fi
if [ $number1 -gt $number2 ]
then
until [ $number1 -eq $number2 ]
do
echo "$number1"
number1=`expr $number1 - 1 `
done
echo "$number1"
exit 0
fi
echo " Numbers are equal "
exit 0
TINNED PECHNIC AT VINTAGE PECHNIC AT VINTAGE PECHNIC AT
ReplyDeleteTitanium Chunky PECHNIC AT titanium wedding bands VINTAGE titanium bracelet PECHNIC AT VINTAGE titanium fat bike PECHNIC AT VINTAGE PECHNIC AT VINTAGE PECHNIC AT VINTAGE titanium stud earrings GARDENS, 2-in-1 titanium tv apk 3in-2
a504x9stxat755 wolf dildo,sex chair,Rabbit Vibrators,fantasy toys,dildo,sex toys,glass dildos,women sexy toys,vibrators f003u7oroda994
ReplyDelete