SC1129 – ShellCheck Wiki

See this page on GitHub

Sitemap


You need a space before the !.

Problematic code:

while! [ -f file ]
do sleep 1; done

Correct code:

while ! [ -f file ]
do sleep 1; done

Rationale:

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

Exceptions:

None


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