On Fri, 15 Jan 1999, Oliver Thuns wrote: > Hello! > > How could I substitute a string (links) in html files with standard > Linux (debian) tools? > > i.e. I want to change every http://one.domain.com in > http://two.domain.com in some files and files in subdirs. >
sed -e "s/two/one/g" f1.html >f2.html Don't redirect to your input file! You will lose it. If you need it to be the same name, just rename afterwards. The "s/two/one/g" substitutes two for one globally. Read sed's man page for more info. > Oliver > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null > /----------------------------------------------------------\ | pretzelgod | [EMAIL PROTECTED] | | (Eric Gillespie, Jr.) | [EMAIL PROTECTED] | |---------------------------<*>----------------------------| | "That's the problem with going from a soldier to a | | politician: you actually have to sit down and listen to | | people who six months ago you would've just shot." | | --President John Sheridan, Babylon 5 | \----------------------------------------------------------/