Looking for a program... don't know what it would be called


(rivenwanderer) #1

I’d like to know where I can find a program that goes through a batch of documents {I want to make widespread changes to the content of a bunch of html pages} and essentially does a “find and replace” and saves the changes. I’d google but… I don’t know what it’s called… any ideas?


(VelikM) #2

You might check into ‘sed’ it may do what you need.
http://www.google.com/search?hl=en&ie=ISO-8859-1&q=sed&btnG=Google+Search


(basse) #3

well… here’s how I would do it:

replaces all instances of “basse” with “rivwanderer” in all html files inside the directory:

for f in *.html; do sed "s/basse/rivwanderer/g" $f | cat > $f; done

sed uses regular expressions, can be quite complicated if you really get into it… so read man-page … and make backups before :slight_smile:

[/b]


(thatbrikwal) #4

i’m sure that there are some html editos or text editors tha can do a global search and replace trick… try notetab light or html-kit (use a plugin) if you’re on windows. alternatively, you can try searching online for a find and replace utility, many for windows (again i don’t know what system you use).


(jesterKing) #5

textpad does things like that (www.textpad.com)