SC1059 – ShellCheck Wiki

See this page on GitHub

Sitemap


Semicolon is not allowed directly after do. You can just delete it.

Problematic code:

while true; do; true; done

while true;
do;
  true;
done;

Correct code:

while true; do true; done

while true;
do
  true;
done;

Rationale:

Semicolon ; is not allowed directly after a do keyword. Follow it directly with either a command or a linefeed as shown in the example.

Exceptions:

None.


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