Linux shell脚本调试 2019年9月9日 02:31:57Linux大全评论891 views阅读模式 1.sh -x script 这将执行脚本并显示所有变量的值 如,脚本: #!/bin/bash #a test about shift if [ $# -le 0 ] then echo "there is no parameters" exit 0 fi sum=0 while [ $# -gt 0 ] do sum=`expr $sum + $1` shift done echo $sum 输出: 点赞 登录收藏 https://www.qieseo.com/226817.html 复制链接 复制链接