Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by karlgoethebier (Abbot)
on Dec 08, 2012 at 20:14 UTC ( [id://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»

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-19 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found