From c5ef79174043b5bcfa65cadc588f2fdf71a3fc0f Mon Sep 17 00:00:00 2001 From: Martin Blazik Date: Mon, 28 Sep 2020 20:03:12 +0200 Subject: [PATCH] Bash doc --- doc/bash.md | 1 + doc/cheatsheet.md | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/bash.md b/doc/bash.md index 9fed9cb..c322a81 100644 --- a/doc/bash.md +++ b/doc/bash.md @@ -5,3 +5,4 @@ - [7 Command-Line Tools That Make Your Life Easier](https://levelup.gitconnected.com/7-command-line-tools-that-make-your-life-easier-d69c38850d6c) - [Best Practices for Bash Scripts](https://medium.com/better-programming/best-practices-for-bash-scripts-17229889774d) - [Oh-My-Zsh! A Work of CLI Magic — Tutorial for Ubuntu](https://medium.com/wearetheledger/oh-my-zsh-made-for-cli-lovers-installation-guide-3131ca5491fb) +- [Consider Starting All Your Bash Scripts with These Options.](https://medium.com/factualopinions/consider-starting-all-your-bash-scripts-with-these-options-74fbec0cbb83) diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index 9271423..13407f4 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -21,7 +21,6 @@ sudo su ### Bash ```bash mv /path/readme.md{,.backup} # mv /path/readme.md /path/readme.md.backup - ``` ### To explore @@ -32,9 +31,10 @@ mv /path/readme.md{,.backup} # mv /path/readme.md /path/readme.md.backup ### Script errors ```bash -set -o errexit -set -o nounset +set -o errexit | set -e +set -o nounset | set -u set -o pipefail +set -x # dump all commands ``` ### Linux usermod - modifu user account