3 SC1051
Joachim Ansorg edited this page 2021-11-12 10:36:46 +01:00

Semicolons directly after then are not allowed. Just remove it.

Problematic code:

if true; then; echo "Hi"; fi

Correct code:

if true; then echo "Hi"; fi

Rationale:

then keywords should not be followed by semicolons. It's not valid shell syntax.

You can follow them directly with a line break or another command.

Exceptions:

None