abs=-1;
printf “the number is : %d\n” $abs;
printf “abs is : %d\n” $abs;
if [ $abs -lt 0 ]; then
let abs=0-$abs;
fi
printf “abs is : %d\n” $abs;
printf “the number is : %d\n” $abs;
printf “abs is : %d\n” $abs;
if [ $abs -lt 0 ]; then
let abs=0-$abs;
fi
printf “abs is : %d\n” $abs;
版权声明:本文为yixian918原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。