Email List: Xaustin-group-lX
[All Lists]

Re: Invalid shell assignments in environment

To: David Korn <dgk@xxxxxxxxxxxxxxxx>
Subject: Re: Invalid shell assignments in environment
From: Chet Ramey <chet.ramey@xxxxxxxx>
Date: Wed, 01 Jul 2009 22:48:37 -0400
Cc: austin-group-l@xxxxxxxxxxxxx, chet.ramey@xxxxxxxx
Organization: ITS, Case Western Reserve University
References: <200907012242.n61MgCCp020103@penguin.research.att.com>
David Korn wrote:
> cc: chet.ramey@case.edu
> Subject: Re: Invalid shell assignments in environment
> --------
> 
>> What should the shell do with environment strings that are not valid
>> shell assignment statements?  The question came up about environment
>> variable names containing characters outside the set permissible for
>> shell variable names, but it could also apply to environment strings
>> like `a' or `=a'.
> 
> This issue was presented to me last september by someone from Red Hat.
> They said that dash and bash passed them along so I added this to ksh93.
> 
> I will do whatever the standard requires.  I would like
> to hear argument on both sides.

Interesting.  I changed it the other way because I got a bug report
about bash creating invalid variables if such names appeared in the
environment.  Since bash uses its table of variables and functions
to create the export environment, the "passing along" stopped as a
side effect.

There are a growing number of applications that attempt to take
advantage of this and use environment variable names that are not
valid shell variable names.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

<Prev in Thread] Current Thread [Next in Thread>