echo "Please enter four numbers: \c"
for i in 1 2 3 4
[ $number -gt $max ] && max=$number
echo "The maximum is: $max"
When I run it, for example, I type 1 2 3 4 and it does nothing...
on 04/30/2012 – Made popular on 04/30/2012
I am trying to calculate the maximum number from four numbers input by the user. I have the following code, but it does not work. It says there's an error with the last line "done". Any help would be appreciated.