+ -
当前位置:首页 → 问答吧 → 初学求助

初学求助

时间:2011-02-25

来源:互联网

Write a shell script to check if the number of argument is 1. If not, then display an error message and exit with 2. The exit status can be checked by echo $?
Sample output is as follows. (10 points)
运行如下
tsaiy:/./q2
./q2 requires an argument
tsaiy:/echo $?
2
tsaiy:/./q2 7
tsaiy:/echo $?
0

作者: hzy12359   发布时间: 2011-02-25

???

作者: hzy12359   发布时间: 2011-02-25

热门下载

更多