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

Re: shell script question



> Is there any way to export a variable for one parent shell to a different 
> parent shell?

No.  But what you can do is to have your child script output a set of 
assignment statements, which can then be executed by the parent.  For 
example if 'child' is a script that writes

FOO=bar
BAD=good

to stdout, then you can execute

eval `child`

in the parent process.

HTH,
Andrew.

-- 
To reply by email, replace "deadspam.com" by "alumni.utexas.net"



Reply to: