$ cat ppn.sh
# to print positive or negative numbers
clear
echo " `tput cup 5 5` enter number:"
tput cup 5 30;read var
if [ $var -eq 0 ]
then
clear;tput cup 5 5;echo "zero"
elif [ $var -lt 0 ]
then
tput cup 7 5;echo "negative"
else
tput cup 7 5;echo "positive"
fi
# to print positive or negative numbers
clear
echo " `tput cup 5 5` enter number:"
tput cup 5 30;read var
if [ $var -eq 0 ]
then
clear;tput cup 5 5;echo "zero"
elif [ $var -lt 0 ]
then
tput cup 7 5;echo "negative"
else
tput cup 7 5;echo "positive"
fi
No comments:
Post a Comment