-
## Description
It is recommended to use `./` or `--` glob so names with dashes won't become options. #### Problematic code: ```bash rm * ``` #### Preferred code: ```bash rm ./* # or rm -- * ``` …
-
## Description
According to [POSIX](http://pubs.opengroup.org/onlinepubs/009695399/utilities/expr.html): > The expr utility has a rather difficult syntax [...] In many cases, the arithmetic and st…
-
## Description
Consider using the `$(...)` notation instead. Backtick command substitution `\`...\`` is legacy syntax with several issues. * It has a series of undefined behaviors related to quoting …
-
## Description
Consider using the `$(...)` notation instead. Backtick command substitution `\`...\`` is legacy syntax with several issues. * It has a series of undefined behaviors related to quoting …
-
## Description
According to [POSIX](http://pubs.opengroup.org/onlinepubs/009695399/utilities/expr.html): > The expr utility has a rather difficult syntax [...] In many cases, the arithmetic and st…
-
## Description
When command expansions are unquoted, word splitting and globbing will occur. This can result unintended behaviour filenames contain spaces. Trying to fix it by adding quotes or escape…
-
## Description
#### Problematic code: ```bash ls -l | grep " $USER " | grep '\.txt$' NUMGZ="$(ls -l *.gz | wc -l)" ``` #### Preferred code: ```bash find . -maxdepth 1 -n…
-
## Description
Variables that are declared but not used for anything should be removed. #### Problematic code: ```bash foo=42 echo "$FOO" ``` #### Preferred code: ```bash foo=42 echo "…
-
## Description
#### Problematic code: ```bash name=World echo 'Hello $name' ``` #### Preferred code: ```bash name=World echo "Hello $name" ``` If you want to use the values of var…
-
## Description
When command expansions are unquoted, word splitting and globbing will occur. This can result unintended behaviour filenames contain spaces. Trying to fix it by adding quotes or escape…