FW: Sed Script works in 3.02-1, fails in 4.0.1-1

Dwight Neal DwightN@millbrook.com
Mon Jan 13 03:30:00 GMT 2003




I included the WRONG sed script with the original message.

Attached is the correct one--that is, the one that creates the fuss--, with
the (obviously) missing RE.  

Sorry to waste your time on that--I had been doing a lot of testing and
forgot I fiddled with the script.

Thanks,
Dwight Neal



-----Original Message-----
From: Peter S Tillier [mailto:peter_tillier@yahoo.co.uk] 
Sent: Wednesday, January 08, 2003 4:57 PM
To: Dwight Neal; cygwin@cygwin.com
Subject: Re: Sed Script works in 3.02-1, fails in 4.0.1-1


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


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

s//<font><\/font><\/BLOCKQUOTE>/

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.

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.

HTH
Peter S Tillier


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts http://uk.my.yahoo.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cygwin.com/pipermail/cygwin/attachments/20030113/847bb27f/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: modifyhtm.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20030113/847bb27f/attachment.txt>


More information about the Cygwin mailing list