SC1053 – ShellCheck Wiki

See this page on GitHub


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

Problematic code:

if mycommand; then echo "True"; else; echo "False"; fi

Correct code:

if mycommand; then echo "True"; else echo "False"; fi


else 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.



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