bingieman Posted August 14, 2016 Share Posted August 14, 2016 Hi everyone, I just used wget -r to get all the files of a website and was wondering the best way to find and replace and a certain word that is present hundreds of times in the seventy files I extracted. To avoid doing this manually, I was wondering if I could do this in one attempt and avoid clocking many hours. There are multiple files of many types so I was wondering if there is an application that you guys might know that can do that. Thanks for your time. Quote Link to comment Share on other sites More sharing options...
0phoi5 Posted August 15, 2016 Share Posted August 15, 2016 CMD can do this with; sed s/[keyword]/[replacement]/g [filename] > [new filename] BASH can do this with; replacetext [filename] [keyword] [replacement] where 'Keyword' is the word you wish to replace, 'filename' is the file(s) in which you want to change the keyword (wildcards allowed, e.g.; *.txt), and 'replacement' is what you want to amend the keyword to. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.