2126
Error prone
Informational
Consider using grep -c instead of grep|wc -l.
Bash, zsh, ksh: regardless what Shell you use, Codiga got you covered. With hundreds of rules, the Codiga Static Engine checks for any issue in your shell script and surfaces issues in your Shell codebase.
Consider using grep -c instead of grep|wc -l.
Use egrep -q instead of comparing output with [ -n .. ].
Instead of '[ true ]', just use 'true'
Instead of '[ 1 ]', just use '1'
Quote this invalid brace expansion since it should be passed literally to eval.
Remove superfluous (..) around condition.
Remove superfluous (..) around test command.
Use { ..; } instead of (..) to avoid subshell overhead.
Use -n instead of ! -z.
Use [ -n .. ] instead of ! [ -z .. ].