<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>FW: Sed Script works in 3.02-1, fails in 4.0.1-1</TITLE>
</HEAD>
<BODY>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>I included the WRONG sed script with the original message.</FONT>
</P>

<P><FONT SIZE=2>Attached is the correct one--that is, the one that creates the fuss--, with the (obviously) missing RE.  </FONT>
</P>

<P><FONT SIZE=2>Sorry to waste your time on that--I had been doing a lot of testing and forgot I fiddled with the script.</FONT>
</P>

<P><FONT SIZE=2>Thanks,</FONT>
<BR><FONT SIZE=2>Dwight Neal</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Peter S Tillier [<A HREF="mailto:peter_tillier@yahoo.co.uk">mailto:peter_tillier@yahoo.co.uk</A>] </FONT>
<BR><FONT SIZE=2>Sent: Wednesday, January 08, 2003 4:57 PM</FONT>
<BR><FONT SIZE=2>To: Dwight Neal; cygwin@cygwin.com</FONT>
<BR><FONT SIZE=2>Subject: Re: Sed Script works in 3.02-1, fails in 4.0.1-1</FONT>
</P>
<BR>

<P><FONT SIZE=2>----- Original Message -----</FONT>
<BR><FONT SIZE=2>From: "Dwight Neal" <DwightN@millbrook.com></FONT>
<BR><FONT SIZE=2>To: <cygwin@cygwin.com></FONT>
<BR><FONT SIZE=2>Sent: Wednesday, January 08, 2003 7:33 PM</FONT>
<BR><FONT SIZE=2>Subject: Sed Script works in 3.02-1, fails in 4.0.1-1</FONT>
</P>
<BR>

<P><FONT SIZE=2>> I am migrating from a machine that uses a cygwin image loaded in May</FONT>
<BR><FONT SIZE=2>2002 to</FONT>
<BR><FONT SIZE=2>> one that uses a November 2002 download, and have a sed script that</FONT>
<BR><FONT SIZE=2>fails in</FONT>
<BR><FONT SIZE=2>> the newer version:</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> (This should be a single line of input, but I'm sure it will wrap when</FONT>
<BR><FONT SIZE=2>> emailed):</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> sed -f modifyhtm.txt "\Web Configuration\Default_installing.htm"</FONT>
<BR><FONT SIZE=2>> >results\Default_installing.htm</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> The error reported is:</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> 'sed: file modifyhtm.txt line 1: No previous regular expression'</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>As modifyhtm.txt contains:</FONT>
</P>

<P><FONT SIZE=2>s//<font><\/font><\/BLOCKQUOTE>/</FONT>
</P>

<P><FONT SIZE=2>the reason for the error message is obvious.  The // refers to a previously-compiled RE and there isn't one.  This is an error in your script, not sed 4.0.1-1 and should also give the same error message with sed 3.02-1.</FONT></P>

<P><FONT SIZE=2>As Randall says using / separators in s commands when slashes are part of the RE is tricky.  You can use pretty much any separator other than a backslash.</FONT></P>

<P><FONT SIZE=2>HTH</FONT>
<BR><FONT SIZE=2>Peter S Tillier</FONT>
</P>
<BR>

<P><FONT SIZE=2>__________________________________________________</FONT>
<BR><FONT SIZE=2>Do You Yahoo!?</FONT>
<BR><FONT SIZE=2>Everything you'll ever need on one web page</FONT>
<BR><FONT SIZE=2>from News and Sport to Email and Music Charts <A HREF="http://uk.my.yahoo.com" TARGET="_blank">http://uk.my.yahoo.com</A></FONT>
</P>

<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT> 

</BODY>
</HTML>