In <[EMAIL PROTECTED]>, on 01/15/99 at 12:39 PM, "Oliver Thuns" <[EMAIL PROTECTED]> said:
>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. In using sed to do this, you may want to expand the string being sought by sed so that you don't inadvertently change other instances of "one" to "two." If you do want to search for "http://one.domain" and change it to "http://two.domain" then you need to "escape" the slashes, since they also serve as control characters for sed. (The colon may too. I don't recall offhand, as my experience is limited.) This would be done as follows: sed s/http:\/\/one.domain/http:\/\/two.domain/g file > file1 The "\" in front of each "/" tells sed to treat the "/" as a regular character, instead of a control character. Kenward -- ----------------------------------------------------------- [EMAIL PROTECTED] What do you call a bus of lawyers headed over a cliff, with two empty seats? A waste of space. -----------------------------------------------------------