set-u 如果变量不存在,报错,默认情况是忽略 等同于-o nounset-x 在执行前先输出命令(方便debug) 等同于-o xtrace-e 任何错误都中断执行 等同于 -o errexit (对管道无效,因为-e只根据管理的最后一条返回来判断是否成功)-o pipefail 任何一个管道失败就失败总结:一般shell 前面都是set -euxo pipefail或者set -euxset -o pipefail