set -o pipefail causes a pipeline (for example, curl -s https://sipb.mit.edu/ | grep foo ) to produce a failure return code if any command errors. Normally, pipelines only return a failure if the last command errors. In combination with set -e , this will make your script exit if any command in a pipeline errors.
标签:set,return,pipefail,errors,command,any From: https://www.cnblogs.com/yinhuachen/p/17373252.html