A variable name in bash must begin with a letter or an underscore, and can be followed by any letter or number, or more underscores.
These variables names are all legal:
- myvar
- MYVAR
- Myvar
- mYVAR
- _myvar
- my_var
- myvar_
- my012
These variable names are not allowed:
- 1myvar
- my-var
- my.var
- my:var