Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: looking for a quickie

by graff (Chancellor)
on Mar 19, 2003 at 04:29 UTC ( [id://244238]=note: print w/replies, xml ) Need Help??


in reply to How do I execute a shell command against each file in a directory and it's subdirectories? (was: looking for a quickie)

Just for fun, check my home node here on perlmonks -- there's a pointer there to a script called "shloop", which provides a perl-based approach to what you want to do, and also has some handy extras (like what if you want to do something like "some_proc < orig/file.orig > new/file.new" on hundreds of files...); and it works on windows. Your particular case could be handled -- if you have the windows port of the GNU "find" utility -- as follows:
find . -name '*.foo' | shloop -e 'doit -switches'
(If you don't have the windows port of GNU find, you can write something in perl using File::Find, of course...)

update: fixed the usage on gnu find.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://244238]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found