Bug or no Bug ? This is not a good process

Asked by kaphar on 2011-05-07

This is a real surprise:

$4="sudo -i" ; export $4

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu bash Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
2011-05-08
Last query:
2011-05-08
Last reply:
2011-05-08

This is two commands strung together. The first one

$4="sudo -i"

does nothing, as $4 expands to empty space. For the same reason, the command

export $4

expands to just

export

which is what produces all the output you're seeing (i.e., a list of all the current exports).

I'm not sure what you're actually trying to do...but that's an explanation of the behavior you're seeing.

kaphar (captain-harry) said : #2

Thanks Eliah Kagan, that solved my question.