loop through folders

mwoehlke mwoehlke@tibco.com
Mon Jun 19 23:57:00 GMT 2006


Brian Dessent wrote:
> mwoehlke wrote:
>> This is not a Cygwin question. However, 'find . | xargs <your program>'
>> might help you.
> 
> It's not a bad idea to get into the practice of always doing "find .
> -print0 | xargs -0 <your program>" instead of the above.  Otherwise,
> files with spaces or other strange characters in their names will cause
> the command to fail.  And even if you don't happen to have any filenames
> with spaces at the moment, it doesn't hurt -- it's just good hygeine.

Yeah, yeah... you're talking to someone that's used to working on old 
Solaris and HP-UX machines that don't have GNU findutils :-). (I'm 
working on that, though ;-) ...but I expect HP-UX to be an uphill battle 
:-(.)

-- 
Matthew
...Ruthlessly beating Windows with a hammer until it looks like POSIX.



More information about the Cygwin-talk mailing list