Is it the same convention as those used in known programming languages such as Java and C? I'm trying to create a lot of variables and I want it to start with a number, but I'm not sure if it's okay.


According to The Open Group a variable name may not start with a number.

A valid variable name start with a letter capitalized or uncapitalized. The following characters can be letters, digits or an underscore (_).

  • Thanks! I'm thinking of just writing the numbers in words. May 29 '14 at 1:38

variable naming convention in shell is Variable name must begin with alphanumeric character or underscore character (_), followed by one or more alphanumeric or underscore characters. note that: Variables can also contain digits, but a name starting with a digit is not allowed see tldp for more details.

Not the answer you're looking for? Browse other questions tagged or ask your own question.