Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

Find n Replace word in set of files

 
Sham Jowsaki
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Report post to moderator
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)
aa
bb
cc
xx
yy
zz
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
Thanks
Cheers
Jowsaki
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic