Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How can I run an folder full of text files through a perl script?

by karlgoethebier (Vicar)
on Dec 08, 2012 at 20:14 UTC ( #1007923=note: print w/ replies, xml ) Need Help??


in reply to How can I run an folder full of text files through a perl script?

Karl-Mac-mini:find karl$ find . -type f -name "*.txt" | xargs ./perl.p +l bar foo

Update: or find . -type f -name "*.txt" -exec ./perl.pl {} \;

See find, xargs

Update: For xargs vs exec see: 1 2 3

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»


Comment on Re: How can I run an folder full of text files through a perl script?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2015-07-02 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (29 votes), past polls