Pattern: Unmatched case
statement in shell script
Issue: -
ShellCheck has detected that one of the patterns in a case
statement will never match.
Often, this is due to mistakes in the case statement word that results in unintended literal characters.
Example of incorrect code:
case "$var " in # Trailing space
value) echo "Match"
esac
Here there's a trailing space that will prevent the match from ever succeeding.
Example of correct code:
case "${var}" in # No trailing space
value) echo "Match"
esac