[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Document variable names need to be all ASCII
From: |
Greg Wooledge |
Subject: |
Re: Document variable names need to be all ASCII |
Date: |
Mon, 19 Apr 2021 09:44:45 -0400 |
On Mon, Apr 19, 2021 at 08:28:54PM +0800, 積丹尼 Dan Jacobson wrote:
> $ e哈=1
> bash: e哈=1: command not found
> OK, but on man bash is it ever mentioned that a variable name must be all
> ASCII?
>
> ENVIRONMENT
> When a program is invoked it is given an array of strings called the
> environment. This is a list of name-value pairs, of the form
> name=value....
>
> PARAMETERS
> A parameter is an entity that stores values. It can be a name, a num‐
> ber, or one of the special characters listed below under Special Param‐
> eters. A variable is a parameter denoted by a name. A variable has
> ...
DEFINITIONS
name A word consisting only of alphanumeric characters and under‐
scores, and beginning with an alphabetic character or an under‐
score. Also referred to as an identifier.
"Alphanumeric" here clearly means [[:alnum:]] within the POSIX locale.