Last active 1748862232

nithir's Avatar nithir revised this gist 1748862232. Go to revision

No changes

nithir's Avatar nithir revised this gist 1748862214. Go to revision

1 file changed, 4 insertions, 1 deletion

header_shell.sh

@@ -1,3 +1,6 @@
1 1 set -e # interromp le script sur une erreur (pas besoin de traiter le return code pour ça)
2 2 set -u # plante si on utilise une variable non défini
3 - set -o pipefail # plante si on a une commande qui plante dans un pipe
3 + set -o pipefail # plante si on a une commande qui plante dans un pipe
4 +
5 + # capture l'erreur et l'affiche
6 + trap 'echo "Error occurred at line $LINENO. Command: $BASH_COMMAND"' ERR

nithir's Avatar nithir revised this gist 1728457821. Go to revision

1 file changed, 0 insertions, 0 deletions

gistfile1.txt renamed to header_shell.sh

File renamed without changes

nithir's Avatar nithir revised this gist 1728457804. Go to revision

1 file changed, 3 insertions

gistfile1.txt(file created)

@@ -0,0 +1,3 @@
1 + set -e # interromp le script sur une erreur (pas besoin de traiter le return code pour ça)
2 + set -u # plante si on utilise une variable non défini
3 + set -o pipefail # plante si on a une commande qui plante dans un pipe
Newer Older