www.qprq.net > shEll脚本编程的加法出错,求大神帮忙看看哪里出错

shEll脚本编程的加法出错,求大神帮忙看看哪里出错

#!/bin/bash sum=0 i=2 while (($i

#!/bin/sh fun() { sum=0 for i in `seq $1 $2` do sum=`expr $i + $sum` done echo $sum } echo "Please input 2 number:" read a b expr $a + 0 1>/dev/null 2>&1 if [[ $? -ne 0 ]];then echo "wrong number" exit 1; fi expr $b + 0 1>/dev/...

网站地图

All rights reserved Powered by www.qprq.net

copyright ©right 2010-2021。
www.qprq.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com