2 SC1129
Joachim Ansorg edited this page 2021-11-12 19:11:16 +01:00

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