linux-tutorial/codes/shell/基本脚本/exit命令.sh
2019-10-29 18:22:19 +08:00

10 lines
177 B
Bash
Raw Permalink 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.

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