LinuxShell中set-o的作用
set -o pipefail
command1 | command2 | command3
status=$?
if [[ $status -ne 0 ]]; then
echo "管道中的某个命令失败"
exit $status
fi最后更新于
set -o pipefail
command1 | command2 | command3
status=$?
if [[ $status -ne 0 ]]; then
echo "管道中的某个命令失败"
exit $status
fi最后更新于