Hi I am Having TROUBLE HOW DO I? MAKE THIS WORK I am trying to mass replace text, but I have the string wrong,. Can someone help? perl -pi -w /Users/admin/Desktop/mm/<!-- Added by -->/<!-- Added by Joseph -->/g;' ~/Desktop/*.htm -bash: !--: event not found admins-iMac-2:~ admin$ I am looking for the BEST way to do this basically http://stackoverflow.com/questions/...ch-and-replace-in-text-files-on-mac-and-linux thank you
Do you have a GUI? If so, install a simple text-editor, like Notepad++ or Sublime or something like that, and do the multi-search/replace there instead? Provides checks (find, instead of replace) so you can see that you find what you're really after, you can do search/replace on regex, do it on multiple files without actually loading the files into the editor and so on and so forth.
Is 11,700 HTML files...... I tried with Sublime and it crashed my 8 gig iMac..... I am now using KOMODO 10 ( fingers crosses ) ( Yikes )
Why... 11700? For one site? (you could however do them in batches, ive done search/replace in sublime with ~2k files without it crashing, however that was win 10/16GB RAM)
At first - I was like, well agreed, then after thinking for a few nights, I was like hmmmmm, its a 15 year old site in HTML - its kinda nice owning a "classic" website brings back so many memories This site was gifted to me by a friend, who had a mutual friend that built this site by hand . ALL 11,000 pages, so its just a fun thin to own and to mess with, like pulling out an old nintendo game LOL
Hello, You can use rpl utility for fast, recursive and easy replacement in files. It can be installed by apt or download rpm from site http://www.laffeycomputer.com/rpl.html
I'll second RPL as being better suited to this task. Even so, it REALLY might be time to at least leverage SOME server side processing, if for no other reason that simplifying and unifying things like template handling. Even a "poor mans" setup could work wonders on not just maintaining existing pages, but on adding new ones.