Lew Wolfgang wrote:
Hi Folks,
I've got a web site that's being "retired", so to speak, and will be replaced with a shiny new presentation. But I want to keep the old one on-line for historical reference at a different domainname. For example, the domain hosting the new content would be foobar.org, the one I want to keep for history would be foobar.info. So I need to go through the old html and substitute any references of foobar.org to foobar.info. There are 3705 separate lines in probably 1000 files in a large filesystem hierarchy containing the string that needs swapping. I'd rather not do it by hand!
What would you use? awk? A shell script? Something using grep and sed?
Hi Lew find and sed : find <topdir> -type f -print0 | xargs -0 sed -i -e 's/foobar.org/foobar.info/g' Not tested, don't try it without having a backup! -- Per Jessen, Zürich (13.6°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org