bash 脚本 参数选项
It is possible to set an option inside a Bash script such as set -o errexit
. But how to do the reverse thing, that is, to unset an option?
可以在Bash 脚本中设置一个选项,例如set -o errexit
。 但是如何做相反的事情,也就是取消一个选项?
Change -
to +
to do the reverse thing of unseting an option in bash. For example, to unset the errexit
option set by set -o errexit
:
将-
更改为+
以执行与在bash中取消设置选项相反的操作。 例如,要取消设置set -o errexit
设置的errexit
选项:
set +o errexit
Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。
翻译自: https://www.systutorials.com/how-to-disable-an-option-with-a-bash-script/
bash 脚本 参数选项