SC1056 – ShellCheck Wiki

See this page on GitHub


Expected a }. If you have one, try a ; or \n in front of it.

Problematic code:

bar() { echo "hello world" }

Correct code:

bar() { echo "hello world";}


} is only recognized as the end of a command group when it's a separate token.

If it's not a separate token, like in the problematic example, it will be considered a literal character, as if writing echo "foo}" with quotes, and therefore usually cause a syntax error.

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