linux-tutorial/codes/shell/示例脚本/基本脚本/exit命令.sh
2019-05-10 11:17:57 +08:00

9 lines
167 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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