What you describe is sometimes called PascalCase - but there is AFAIK no "crystal clear" definition of these typographic writing conventions.
As for the naming of Bash variables, I don't know if using PascalCase is really that common. The only "hard" recommendation I know is not to use all uppercase variable names unless you want to export such a variable to an environment variable (there are lots of questions both here and on StackOverflow on that topic). The reason is that (in particular) in Bash, crucial environment variables such as PATH
are all-uppercase, and you will want to avoid clashing with/superseding these variables by accidentally same-named variables of your script. Since the shell is case sensitive, using lower- or mixed case names for "normal" variables helps avoiding this problem.
Note however that it is not that easy if you write scripts for other shells; as noted by @StéphaneChazelas e.g., there are all-lowercase variables with special meaning in zsh
and csh
, so you are in general well-advised to read the documentation for your shell. For sh
, bash
and ksh
, checking your script with shellcheck
(also available as standalone program in many Linux distributions) can be a great help as it also looks for (some of) these potential name clashes.