Created
December 16, 2017 16:59
-
-
Save f4rx/a857bb1c886dcdd22484d0731fc3c51b to your computer and use it in GitHub Desktop.
set -euo pipefail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://farmaz0n.blogspot.ru/2010/12/pipefail.html | |
| #!/bin/bash | |
| set -euo pipefail | |
| Опция -e останавливает скрипт если процесс вернул не 0 (и пишет в stderr на какой строке ошибка). | |
| Опция -u останавливает скрипт, если используется неопределённая переменная. | |
| Опция -o pipefail фейлит выполнение пайпа, если один из подкомпонентов выполняется с ошибкой. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment