shell脚本添加set -eu作用

set 

-e 如果有任意一个命令返回了非0就退出

-u 未赋值的变量会认为是错误,并且会向stderr写一个错误

posted @ 2022-11-10 09:44  paul_hch  阅读(369)  评论(0编辑  收藏  举报