SC1097 – ShellCheck Wiki

See this page on GitHub

Sitemap


Unexpected ==. For assignment, use =. For comparison, use [/[[.

Problematic code:

var==value

Correct code:

Assignment:

var=value

Comparison:

[ "$var" = value ]

Rationale:

ShellCheck has noticed that you're using == in an unexpected way. The two most common reasons for this is:

Exceptions:

If you wanted to assign a literal equals sign, use quotes to make this clear:

var="=sum(A1:A10)"

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