我找到了这个:
man sh:
-x xtrace Write each command to standard error (preceded by
a ‘+ ’) before it is executed. Useful for debug?
ging.
-e errexit If not interactive, exit immediately if any
untested command fails. The exit status of a com?
mand is considered to be explicitly tested if the
command is used to control an if, elif, while, or
until; or if the command is the left hand operand
of an “&&” or “||” operator.
Run Code Online (Sandbox Code Playgroud)
似乎这些只是错误控制选项,可确保在命令失败时不会发生更糟糕的事情。