├── .gitignore ├── 05-compatibility.sh ├── 06-shellcheck.sh ├── 07-variables.sh ├── 08-environment-variables.sh ├── 09-arguments.sh ├── 10-builtins.sh ├── 11-quotes.sh ├── 12-globs.sh ├── 13-redirects.sh ├── 14-brackets.sh ├── 15-bashisms.sh ├── 16-if-statements.sh ├── 17-for-loops.sh ├── 18-reading-input.sh ├── 19-functions.sh ├── 20-pipes.sh ├── 21-parameter-expansion.sh ├── 22-background-processes.sh ├── 23-subshells.sh ├── 24-trap.sh ├── 25.1-errors.sh ├── 25.2-errors-unset.sh ├── 25.3-errors-pipefail.sh ├── 26-debugging.sh ├── README.md ├── files ├── cd.sh ├── error.txt ├── filename with spaces ├── lines.txt ├── owned_by_root.txt ├── star.svg └── test.txt └── zsh.sh /.gitignore: -------------------------------------------------------------------------------- 1 | files/star.png 2 | -------------------------------------------------------------------------------- /05-compatibility.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/05-compatibility.sh -------------------------------------------------------------------------------- /06-shellcheck.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/06-shellcheck.sh -------------------------------------------------------------------------------- /07-variables.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/07-variables.sh -------------------------------------------------------------------------------- /08-environment-variables.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/08-environment-variables.sh -------------------------------------------------------------------------------- /09-arguments.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/09-arguments.sh -------------------------------------------------------------------------------- /10-builtins.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/10-builtins.sh -------------------------------------------------------------------------------- /11-quotes.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/11-quotes.sh -------------------------------------------------------------------------------- /12-globs.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/12-globs.sh -------------------------------------------------------------------------------- /13-redirects.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/13-redirects.sh -------------------------------------------------------------------------------- /14-brackets.sh: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /15-bashisms.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/15-bashisms.sh -------------------------------------------------------------------------------- /16-if-statements.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/16-if-statements.sh -------------------------------------------------------------------------------- /17-for-loops.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/17-for-loops.sh -------------------------------------------------------------------------------- /18-reading-input.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/18-reading-input.sh -------------------------------------------------------------------------------- /19-functions.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/19-functions.sh -------------------------------------------------------------------------------- /20-pipes.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/20-pipes.sh -------------------------------------------------------------------------------- /21-parameter-expansion.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/21-parameter-expansion.sh -------------------------------------------------------------------------------- /22-background-processes.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/22-background-processes.sh -------------------------------------------------------------------------------- /23-subshells.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/23-subshells.sh -------------------------------------------------------------------------------- /24-trap.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/24-trap.sh -------------------------------------------------------------------------------- /25.1-errors.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/25.1-errors.sh -------------------------------------------------------------------------------- /25.2-errors-unset.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/25.2-errors-unset.sh -------------------------------------------------------------------------------- /25.3-errors-pipefail.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/25.3-errors-pipefail.sh -------------------------------------------------------------------------------- /26-debugging.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/26-debugging.sh -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/README.md -------------------------------------------------------------------------------- /files/cd.sh: -------------------------------------------------------------------------------- 1 | cd files 2 | PANDA="i'm a panda" 3 | -------------------------------------------------------------------------------- /files/error.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /files/filename with spaces: -------------------------------------------------------------------------------- 1 | i'm a file, there are spaces in my name! 2 | -------------------------------------------------------------------------------- /files/lines.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/files/lines.txt -------------------------------------------------------------------------------- /files/owned_by_root.txt: -------------------------------------------------------------------------------- 1 | hi 2 | -------------------------------------------------------------------------------- /files/star.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/files/star.svg -------------------------------------------------------------------------------- /files/test.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /zsh.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jvns/shell-examples/HEAD/zsh.sh --------------------------------------------------------------------------------