Help on bash script?
Qiang.Xu at fujixerox.com
Fri Aug 12 02:35:43 GMT 2005
Giorgos Keramidas wrote:
> On 2005-08-12 10:16, Xu Qiang <Qiang.Xu at fujixerox.com> wrote:
>> Btw, can we "export" a value in the sub-shell back to the parent?
> Only through `backquote subtitution', as the child process cannot
> affect the environment of the parent process.
> value=`shell command`
> value=$(shell command)
Ah, yes, I mistakened it. The "export" mechanism is to preserve the value from the parent to the child, not the other direction, as described in the book "The Unix Programming Environment" by Brian Kernighan and Rob Pike.
More information about the freebsd-questions