Chris Arnold schreef: > There are a couple of reasons why this does not work. First and foremost: > since > your replacement text contains '/', you should use a text separator different > from '/' like > s#foo#bar#g > > If I remember correctly < and > are also special (have to look that up) and > you > should escape them: \< and \>. > > Finally, this would only work on a consecutive text without newlines and I > think > that is not what you have in mind. > > Look up the c command in sed, because I think that is what you need. This lets > you replace a couple of lines with a couple of other lines. > > OK, i have looked up the c command nd run this command: > sed -ic 's#<HTML><HEAD><TITLE>Net Bible - Genesis </TITLE><LINK > REL=Stylesheet HREF="style.css" TYPE="text/css" MEDIA=screen></HEAD><body><p > class=title>#<?php require('../../wp-blog-header.php'); ?><?php get_header(); > ?><?php include(TEMPLATEPATH."/sidebar1.php");?><div id="main"><div > id="content">#g' ./* > > And this time, i do not get an error and i am left at the prompt. Then i > check 1 of the files and nothing has been replaced. So, is my syntax for the > c command in sed right (sed -ic)? I tried sed -c and got an invalid --c > option. I wonder if some of the problem is that the <TITLE>Net Bible - > Genesis </TITLE> line is different for every file. In other words, for the > book of Genesis, for every chapter (every chapter is a new file), this line > would read <TITLE>Net Bible - Genesis - 50</TITLE> for chapter 50. I think i > need something like a wildcard to use here in the sed command. I just tried > it without the <TITLE>Net Bible - Genesis </TITLE> line in the sed command > and it still does not replace the text. I would be happy to send someone one > of these htm files so you could see what i am talking about.
There's a difference between command and option. You use the -ic option (I don't know what that does, but obviously not what you want) and the s command. I suggest you do a read up on sed. Google "sed tutorial" and if all else fails type #sed in konquerors location bar. Regards, -- Jos van Kan registered Linux user #152704 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]