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

Re: exporting a variable to global shells



On Mon, May 14, 2007 at 05:49:21PM EDT, Bob McGowan wrote:

<snip>

> Further processing would then need be done on the string to break it up 
> into pieces, or not, as dictated by the needs of the caller.  My 'child 
> | read a b c d' is a quick way to read in the multiple lines output by 
> your method, or to break a long line up on any white space characters. 
> Without using the arrays suggested by another poster, which may not be 
> supported by all versions of Bourne type shells.

I was vaguely hoping bash's arrays might be passed to the child via a
pointer.. found out this wasn't the case.

That's how I ran into the array trick mentioned in my earlier post. 

My take on this is that if you have to go through such contortions to
pass data back from a child to a parent .. you've either chosen the
wrong strategy or (more likely) the wrong programming language in the
first place.

Thanks,
cga



Reply to: