BASH question

Dave Mason dmason-bqArmZWzea/GcjXNFnLQ/w at public.gmane.org
Fri Dec 21 17:15:24 UTC 2007


I wasn't aware of this new-fangled syntax:

    while ...; do
	...
    done < <(ls -l)

but it does appear to work.  If you want something that works with older
shells, you can do something like:

	ls -l | (
	   while ...; do
		 x=...
	   done
	   ... $x ...
	   )

where everything in the () runs in a separate shell with stdin set to
the pipe.

../Dave
--
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