> Von: Chet Ramey <chet.ra...@case.edu> > 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, lorenz.bucher....@rohde-schwarz.com 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 variables. 2) Variables whose names match the pattern "BASH_FUNC_*%%". These indicate bash exported functions, and are parsed to create function definitions. 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.