koalaman / shellcheck Public
SC2282
Vidar Holen edited this page Dec 31, 2020
·
1 revision
Variable names can't start with numbers, so this is interpreted as a command.
Problematic code:
411toppm=trueCorrect code:
_411toppm=trueRationale:
You appear to be assigning to a variable name that starts with a digit. This is not allowed: variables must start with A-Z, a-z or _.
Switch to a variable name that does not start with a digit.
Exceptions:
None
Related resources:
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!