Hi, I want to write a script that is designed to find the largest entry in a nonempty list of integers.
i was thinking about using array variables, but i'm not sure
any ideas?
Hi, I want to write a script that is designed to find the largest entry in a nonempty list of integers.
i was thinking about using array variables, but i'm not sure
any ideas?
can u give sample input??
for example, if i give 3 5 7 19 2 5 as input, it has to give out the largest entry as output.
try this..
echo "1 12 3 43 77 22"|awk 'BEGIN{RS=" "}{if(max<$0){max=$0}}END{print max}'