Skip to content

Instantly share code, notes, and snippets.

@f4rx
Created December 16, 2017 16:59
Show Gist options
  • Select an option

  • Save f4rx/a857bb1c886dcdd22484d0731fc3c51b to your computer and use it in GitHub Desktop.

Select an option

Save f4rx/a857bb1c886dcdd22484d0731fc3c51b to your computer and use it in GitHub Desktop.
set -euo pipefail
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