-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2272
Joachim Ansorg edited this page Nov 12, 2021
·
2 revisions
$a/$b==foo/bar
[ "$a/$b" = "foo/bar" ]
ShellCheck found a command name that contains a ==
. Most likely, this was intended as a kind of comparison.
To compare two values, use [ value1 = value2 ]
. Both the brackets and the spaces around the =
are relevant.
None, though you can quote the ==
to suppress the warning.
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!