摘要: 在shell脚本中,比如有以下的代码: cd /root/test88 rm -rf backup 如果目录/root/test88不存在,脚本不会停止,依然会执行rm -rf backup这个命令 要让脚本停止执行: #!/bin/bash -e 或 set -e 阅读全文