PROJET AUTOBLOG


le hollandais volant links

Site original : le hollandais volant links

⇐ retour index

The first two statements of your BASH script should be…

jeudi 16 avril 2020 à 22:04

Mh… je ne connaissais pas cette astuce.

Juste après le « shebang », mettre ça sur la ligne d’après :

set -euo pipefail
“set -e” which ensures that your script stops on first command failure.
“set -u” which ensures that your script exits on the first unset variable encountered.
“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.

— (permalink)