Skip to content
Joachim Ansorg edited this page Nov 12, 2021 · 2 revisions

You need a space before the [.

Problematic code:

if[ -e file ]
then echo "exists"; fi

Correct code:

if [ -e file ]
then echo "exists"; fi

Rationale:

ShellCheck found a keyword immediately followed by a [. There needs to be a space between them.

Exceptions:

None

Clone this wiki locally