[lug] Bletcherous pipe, FIXME!
Jeffrey Haemer
jeffrey.haemer at gmail.com
Fri Apr 3 10:14:54 MDT 2009
Zan,
From what I can tell, every pipeline is executed in a subshell just like a
> (). I could be wrong though.
Here's an illustration that's easy to build on:
cd /tmp | cd /etc
pwd # but you've gone nowhere
Neither cd in the pipeline has an effect on your working directory, which
means there's a subshell at work. Turns out there's one for each piece:
each segment is in its own subshell (though they each get much of the
parent's environment).
Some folks learn this stuff by carefully reading the 90-page bash manual,
but simple demos stick in my head better.
--
Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell]
303-997-1219 [Google Voice]
http://seejeffrun.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20090403/e3dda1b9/attachment.html>
More information about the LUG
mailing list