日期:2014-05-16  浏览次数:20737 次

谁能帮我写写shell脚本 :从键盘输入三个整数,计算其中的最小值!
谁能帮我写写shell脚本 :从键盘输入三个整数,计算其中的最小值!


------解决方案--------------------
很简单。
BatchFile code
echo input 3 integers:
read a b c
if [ $a -lt $b ] 
then 
        d=$a
else
        d=$b;
fi
if [ $d -lt $c ]
then
        a=$d
else
        a=$c
fi
echo $a