Looking for ideas / recommendations on finding and replacing a link in all pages of a site, and using Dreamweaver (ick) is not an option. The site consist of 100s of static pages.
A:
What about something like TextPad or Notepad++? You can open up all your html files and then find/replace in all open documents.
Pat
2010-07-23 23:04:57
It occurred to me to use Notepad++, but we're talking several pages here.
gnome
2010-07-23 23:30:28
A:
In Linux/Unix or cygwin (or similar)
$ find topdir -name \*.html -print0 |
xargs -0 sed --in-place
-e 's~http://foo\.com/this/that\.html~http://foo.com/other/location/newfile.html~g'
(line wrapped for readability)
Edit all files in-place under the directory "topdir" replacing the "/this/that.html" url with "/other/location/newfile.html" url.
Stephen P
2010-07-23 23:06:26
+1
A:
In unix, vim has an option to do that.
vim -c "argdo %s/http:\\site.com\/pageA/http:\\site2.com\/pageB/ge | update" *.html
EricR
2010-07-23 23:07:57