1

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.

Matteo
  • 9,796
  • 4
  • 51
  • 66

2 Answers2

1

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 (_).

chaos
  • 48,171
-1

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.