2 SC2194
Joachim Ansorg edited this page 2021-11-12 19:47:03 +01:00

This word is constant. Did you forget the $ on a variable?

Problematic code:

case foo in
  bar) echo "Match"
esac

Correct code:

case $foo in
  bar) echo "Match"
esac

Rationale:

You are using a case statement to compare a literal word.

You most likely wanted to treat this word as a $variable or $(command) instead.

Exceptions:

None