File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Find n Replace word in set of files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply locked New topic

Find n Replace word in set of files

Sham Jowsaki
Ranch Hand

Joined: May 22, 2001
Posts: 146
Hi All,
I hv requirement like find n replacement a word in a file but the filenames are limited and the filesnames list are updated in one files.
like (fn.txt has all filenames has to be changed)
now I have to read this file and do the below process only on those files.
perl -pi.bak -e 's/\bFIND/REPLACEMENT/g' $(find dir -name '*.txt')

Can you please help me out in this regards
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

I don't see a need to give this question, which extends from your other topic, its own topic space. I'm closing this and prompting readers to use the existing topic for responses.

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Have you tried LearnNowOnline?
subject: Find n Replace word in set of files