shell/基本脚本/exit命令.sh

10 lines
168 B
Bash
Raw Permalink Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
#退出状态码最大为255超过则进行模运算
#testing the exit status
var1=10
var2=20
var3=$[ $var1 + $var2]
echo The answer is $var3
exit 5