-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2130
Joachim Ansorg edited this page Nov 12, 2021
·
4 revisions
[[ $foo -eq "Y" ]][[ $foo = "Y" ]]Shells have two sets of comparison operators: for integers (-eq, -gt, ...) and strings (=, >, ...). ShellCheck has noticed that you're using an integer comparison with string data.
If you are in fact comparing integers, double check your parameters. Certain mistakes like $$foo or ${bar}} can introduce non-numeric characters into otherwise numeric arguments.
None.