shell控制流程 #!/bin/bash #存储为a.shif [ $1 == 100 ] then return 0 #参数正确,返回0 else return 1 #参数错误,返回1 fi #!/bin/bash #存储为b.sh echo $? $ . ./a.sh 100 $ . ./b.sh 0 posted @ 2019-02-18 17:24 动手的程序员 阅读( ...) 评论( ...) 编辑 收藏