$ on a variable?case foo in
bar) echo "Match"
esaccase $foo in
bar) echo "Match"
esacYou are using a case statement to compare a literal
word.
You most likely wanted to treat this word as a $variable
or $(command) instead.
None
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.