内容简介:The first statement is a Mac, GNU/Linux, and BSD portable way of finding the location of the bash interpreter. The second statement combinesReferences:
#!/usr/bin/env bash set -euo pipefail
The first statement is a Mac, GNU/Linux, and BSD portable way of finding the location of the bash interpreter. The second statement combines
- “set -e” which ensures that your script stops on first command failure. By default, when a command fails, bash executes the next command. Looking at the logs, you might feel that the script executed successfully while some commands might have failed.
- “set -u” which ensures that your script exits on first unset variable encountered. Otherwise, bash replaces the unset variables with empty default values.
- “set -o pipefail” which ensures that if any command in a set of piped commands failed, the overall exit status is the status of the failed command. Otherwise, the exit status is the status of the last command.
References:
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
离散数学及其应用(原书第4版)
Kenneth H.Rosen / 机械工业出版社 / 2002-1-1 / 75.00
离散数学及其应用:原书第4版,ISBN:9787111075776,作者:(美)Kenneth H.Rosen著;袁崇义[等]译一起来看看 《离散数学及其应用(原书第4版)》 这本书的介绍吧!