BASH question

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Wed Dec 26 16:49:17 UTC 2007


On Fri, Dec 21, 2007 at 12:23:12PM -0500, Lennart Sorensen wrote:
> Can't you just do:
> ls -l | while ...; do
> 	x=...
> done
> ... $x ...
> 
> Does it need a subshell?

Yes.  'x=...' is inside of while-loop in a subshell; whereas, '...$x...'
is outside at the top level.

-- 
William Park <opengeometry-FFYn/CNdgSA at public.gmane.org>, Toronto, Canada
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list