On Mon, 23 Oct 2023 at 13:25, Eduardo M KALINOWSKI
<edua...@kalinowski.com.br> wrote:
> On 22/10/2023 23:13, Greg Wooledge wrote:

> > 2) All-caps variable name IFL.  All-caps variable names are reserved,
> >    by convention, for environment variables (e.g. PATH) and special
> >    shell variables (e.g. IFS).

> While I don't disagree with the suggestion of using lower case for
> variables (and have even started doing so myself), it seems that this
> "convention" is far from universal.

> I did a quick search on the bash manual page and found no suggestion on
> how to name user variables, or that uppercase names are reserved (but it
> was a very quick search - I might have skipped something).

> Even an internet search shows that people seem to be divided:

Hi, for your info, this convention is specified by POSIX:
  https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

Which says:
  Environment variable names used by the utilities in the Shell and
  Utilities volume of POSIX.1-2017 consist solely of uppercase letters,
  digits, and the <underscore> ( '_' ) from the characters defined in
  Portable Character Set and do not begin with a digit.

And:
  The name space of environment variable names containing lowercase letters
  is reserved for applications. Applications can define any environment
  variables with names from this name space without modifying the behavior
  of the standard utilities.

Reply via email to