Dec 16, 2009

Finding Largest and Smallest value from a set



echo "enter 5 nos"
read a b c d e
echo "biggest: " $(echo "$a $b $c $d $e" | tr " " "\n" | sort -rn | head -1)
echo "smallest: "$(echo "$a $b $c $d $e" | tr " " "\n" | sort -n | head -1)