シェルで意図的にエラーを出す方法 テスト時


filename.sh
false
echo $?
# 1が出力
true
echo $?
# 0が出力