infile search and replace on N files

perl -pi -e's/foo/bar/g' file1 file2 fileN
The "g" at the end is for global, meaning replace all occurrences and not just the first one.

By: xsawyerx
2009-01-29 09:47:01

What Others Think

house cleaning tyler tx How can I get more infos about that products
yeoyeo · 90 weeks and 6 days ago
Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up. ??
KayGasaway · 74 weeks and 5 days ago
When a blind man bears the standard pity those who follow…. Where ignorance is bliss ‘tis folly to be wise…. ???????
KayGasaway · 74 weeks ago
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. ???????
KayGasaway · 73 weeks and 2 days ago
Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work. ??? ???
KayGasaway · 72 weeks and 5 days ago
You've completed in excellent work. t suggest to my frtends ind personilly wtll certitnly dtgtt. t'm conftdent they'll be gitned from thts webstte. Onewheel Pint Accessories
KayGasaway · 71 weeks and 2 days ago
Persons appreciate shopping for amazing, appealing, fascinating and from time to time attractive aromas for them selves and pertaining to others. This can be executed conveniently along with inexpensively in an on-line perfume shop. Onewheel Accessories
KayGasaway · 70 weeks and 5 days ago
Nothing compares to Weber using Genesis sort of grills. That is certainly the type gas grills which have been that will always make sure that they deliver a high performance part of down interval Computer Support and Services near me Beverlywoods Los Angeles, California
KayGasaway · 70 weeks and 2 days ago
I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work. ?????
KayGasaway · 70 weeks and 2 days ago
definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog! eye doctor broken arrow
KayGasaway · 65 weeks and 1 day ago
The most complete guide on white jade meaning, benefits, spiritual connection to the Zodiac, birthstone, numerology, and feng shui Shop White Jade.
KayGasaway · 64 weeks and 5 days ago
customer service Paris is a website where you can find more information about it, Please visit this anchor for more information thank You.
ayesha · 64 weeks and 3 days ago
Have you always wanted to buy a decent lamp for the living room? Or finally illuminate the kitchen properly?">textilkabel lampe Then a warm welcome to Lightstock - the online shop for decorative lighting away from hardware stores & amp; Mainstream. Regardless of whether you want to build the perfect lamp yourself - or use lights made by us.
ayesha · 63 weeks and 3 days ago
The best approach is to figure out the type of mattress you want and keep narrowing it down until you know a size, brand, and model. cheap truck mattress
kenwood · 61 weeks and 6 days ago
Slots sites are the most popular search online, that is why we try to collect the Best Slots Sites ??here as a list for convenience over time. Best Slots Sites
KayGasaway · 55 weeks and 2 days ago
Italian scientists found that maca increased general and sexual well-being in patients with mild erectile dysfunction (ED). Booty XXL
kenwood · 44 weeks and 3 days ago
talented interior designer works for the large companies. There are accomplished professionals who are self employed and work from their own home. Interior Design Companies in Abu Dhabi
kenwood · 44 weeks and 2 days ago
bricklaying tips to take into consideration for a nice, neat and sturdy finish would be Getting the mortar right, using a trowel, and laying the bricks.">Bricklayers
kenwood · 44 weeks ago
seofox · 38 weeks ago
Thanks for an interesting blog. What else may I get that sort of info written in such a perfect approach? I have an undertaking that I am just now operating on, and I have been on the lookout for such info. [url=]Young Delhi Escorts[/url] [url=]18+ Escorts Service in Delhi[/url] [url=]Housewife Delhi Escorts Service[/url] [url=]Delhi Call Girls[/url] [url=]College Escorts in Delhi[/url]
parulsharma · 6 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: