On Fri, May 31, 2013 at 2:35 PM, Fernando C.V. <ferk...@gmail.com> wrote: > [...] > > But then on second though, since it's a separate process there would > be problems with environment variables, and this might not have an > easy solution.
Don't worry, even a simple `grep ... | while read l ; do ... ; x=a ; done ; echo $x` wouldn't work, because the `while` in the pipe is in a different process. (You'll have to do something like `while read l ; do ... ; x=b ; done <( grep ... )` to work.) Ciprian.