delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/12/16:58:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <002801c2ba85$accc92e0$5c16989e@oemcomputer>
Reply-To: "Peter S Tillier" <peter_tillier AT yahoo DOT co DOT uk>
From: "Peter S Tillier" <peter_tillier AT yahoo DOT co DOT uk>
To: "Cygwin" <cygwin AT cygwin DOT com>
References: <5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030110080509 DOT 01f00a48 AT pop3 DOT cris DOT com>
Subject: Re: FW: Sed Script works in 3.02-1, fails in 4.0.1-1
Date: Sun, 12 Jan 2003 21:57:57 -0000
Organization: Private
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

----- Original Message -----
From: "Randall R Schulz" <rrschulz AT cris DOT com>
To: <cygwin AT cygwin DOT 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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019