SC1020 – ShellCheck Wiki

See this page on GitHub

Sitemap


You need a space before the ] or ]]

Problematic code:

if [ "$STUFF" = ""]; then

Correct code:

if [ "$STUFF" = "" ]; then

Rationale:

Bourne shells are very whitespace sensitive. Adding or removing spaces can drastically alter the meaning of a script. In these cases, ShellCheck has noticed that you're missing a space at the position indicated.

Exceptions

None.

Ignore

# shellcheck disable=SC1020
if [ "$STUFF" = ""]; then

ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.