My teacher gave us this assigment and he is very vague on his questions. But the question reads write the largest script file that calculates the smallest of three integer numbers that are read from the keyboard. Make it able to recongnize some input errors. I guess he does care what type of errors they are as long as they can be read. The problem is I don't know at all how to do that part of the assigment.
Code:
#This program accepts three numbers and shows the largest of them
#
echo
echo "Enter three numbers and I will show you the largest of them>> \c"
read num1 num2 num3
if test "$num1" -gt "$num2" -a "$num1" -gt "$num3"
then
echo "The largest number is: $num1"
elif test "$num2" -gt "$num1" -a "$num2" -gt "$num3"
then
echo "The largest number is:$num2"
else
echo "The largest number is:$num3"
fi
echo "done!"
echo
exit 0