Jujens’ blog

  • Archives
  • Categories
  • Tags
  • Atom Feed
  • Trucs et astuces Atom Feed
  • Privacy

Bash tricks

Published: 2018-10-03 by Julien Enselme in Trucs et astuces • Tagged with: Bash, Shell, Linux

Contents

  • Scripts
  • Signals

Scripts

Use this at the top of all your Bash scripts to avoid problems:

# Exit on error.
set -e
# Don't allow undefined variable.
set -u
# Make pipeline fail if any command in it fail.
set -o pipefail

Signals

See this article.

© Julien Enselme

This work is licensed under a Creative Commons Attribution-ShareAlike

Creative Commons License

Proudly powered by Pelican