bug-bash
[Top][All Lists]
Advanced

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

Re: "export -p" output not suitable for input when env vars contain non-


From: Linda Walsh
Subject: Re: "export -p" output not suitable for input when env vars contain non-identifiers
Date: Sat, 11 Oct 2014 12:15:20 -0700
User-agent: Thunderbird



Stephane Chazelas wrote:
2014-09-30 17:06:22 +0100, Stephane Chazelas:
Just reiterating in case that had gone unnoticed earlier:

$ env 'a;echo OOPS;: =' bash -c 'export -p' | bash
OOPS

That's because bash outputs:

declare -x a;echo OOPS;:

----

That funny... I think I'm pre-shock patches in v4.2.45.

When I do the above, I get:
env 'a:echo OOPS;: =' bash -c 'export -p' |bash
bash: line 100: declare: _LOCAL_DIR_: readonly variable
bash: line 119: declare: `a:echo': not a valid identifier

So maybe the patch is causing, (*mock*shock*), new, invalid
and undesirable behavior?

But a;echo has never been a valid ID.  neither has anything
with a '/' in it:
env 'a/echo OOPS;: =' bash -c 'export -p' |bash
bash: line 100: declare: _LOCAL_DIR_: readonly variable
bash: line 119: declare: `a/echo': not a valid identifier

Also, a bit surprising, I thought ':' was allowed, but
from this:

env 'a:echo OOPS;: =' bash -c 'export -p' |bash
bash: line 100: declare: _LOCAL_DIR_: readonly variable
bash: line 119: declare: `a:echo': not a valid identifier
 ll /bin/bash
-rwxr-xr-x 1 689048 Mar 22  2013 /bin/bash*

^^^ Mar22 definitely precedes this mess.









reply via email to

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