Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: One-line shell script for find and replace

by ruoso (Curate)
on Oct 05, 2005 at 18:17 UTC ( [id://497689]=note: print w/replies, xml ) Need Help??


in reply to Re^2: One-line shell script for find and replace
in thread One-line shell script for find and replace

I still prefer:

find . -name '*.txt' -exec perl -pi -e 's/find/replace/g' {} \;
daniel

Replies are listed 'Best First'.
Re^4: One-line shell script for find and replace
by Anonymous Monk on Oct 05, 2005 at 20:17 UTC
    In the prior solution, you execute the perl interpreter once. In yours, you execute it many times. You gain maybe a little clarity, but you lose on performance. Only pointing this out if you have 10k files to deal w/

Log In?
Username:
Password:

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

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

    No recent polls found