This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


----- Original Message -----
From: "Randall R Schulz" <rrschulz@cris.com>
To: <cygwin@cygwin.com>
Sent: Friday, January 10, 2003 4:30 PM
Subject: Re: FW: Sed Script works in 3.02-1, fails in 4.0.1-1


> Dwight,
>
> I can reproduce your problem using sed 4.0.1, assuming sed actually
gets
> some input (if there's no input on standard input, the diagnostic does
not
> occur). Changing the pattern separators does not cure the problem.
> Replicating the address range pattern ("<.BLOCKQUOTE>") in the empty
> substitute target pattern does not help.
>
> I'm not a total SED junkie, so maybe there's something I'm overlooking
> here, but it does appear to me to be a bug.
>
> Randall Schulz
>
>
> At 07:41 2003-01-10, Dwight Neal wrote:
>
> >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

I can reproduce the problem too, but I'm not sure that this is
a bug.  When you use an address range such as

1,/<.BLOCKQUOTE>/

there will only be a "previously compiled RE" when the

/<.BLOCKQUOTE>/

part of the address is matched, hence the error message from
GNU sed 4.  Oddly enough GNU sed v3.02.80 seems quite happy
with this form of address pattern.  I think that the bug, if
anywhere, is in earlier versions of sed.

If what you are trying to do is replace </BLOCKQUOTE> with
the string (which will have wrapped in the posting)

<font face="verdana" size="2">When installation completes, click <a
href=..\\..\\Update.asp>here <\/a>to return.<\/font><\/BLOCKQUOTE>

then you don't really need the "1," part of the address.

If you only want to change the first occurrence then you would
need to reorganize the script (or use another tool which makes
it easier to do so, such as awk).

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]