[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue with Bash-4.3 Official Patch 27

From: Greg Wooledge
Subject: Re: Issue with Bash-4.3 Official Patch 27
Date: Fri, 17 Oct 2014 11:34:11 -0400
User-agent: Mutt/

> Von:    Chet Ramey <address@hidden>
> No, shell variable names should continue to be shell identifiers.  You
> can already use `%' (any character, really) in environment variable
> names.

On Fri, Oct 17, 2014 at 05:22:30PM +0200, address@hidden wrote:
> No, I can't. 
> $ foo%%="bar"
> foo%%=bar: command not found

What Chet meant is that it's possible to create environment variables
with "%" in their names.  C can do it, and so can env(1), but bash can't.

>From bash's point of view, the environment variables that it recevies
from its parent fall into three groups:

1) Variables whose names are valid shell identifiers.  These become shell

2) Variables whose names match the pattern "BASH_FUNC_*%%".  These
   indicate bash exported functions, and are parsed to create function

3) Everything else.  These are ignored.

Bash currently does not have a mechanism to create environment variables
with arbitrary names.

> Or better said not in the normal way
> $ set foo%%=bar

That's totally different.  That's just setting the positional parameters
with %% as part of the *content*, not part of a variable name.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]