🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sgi.misc
Article #420

sed: `{ ... }' groups and labels

#420
From: Gaumond Pierre
Date: Thu, 04 Feb 1993 15:50
28 lines
1915 bytes
Recently, I posted a message in which I asked how to make a sed script like
this:

:rcv
/^Received:/N
/^Received:.*\n[ 	]/ { s/\n//; b rcv }
/^Received:/D

I got no answer.

I installed GNU sed and had the same problem with it.

The reason is that `:', `b' and `t' commands skip all blanks between the command
and the label but accepts ANY character afterwards except EOF and
new-line. So, a `:', `b' or `t' command must be terminated with a new-line and
the terminating `}' of the `{ ... }' must be on a separate line.

In GNU sed, it was very simple to correct it. I guest it is the same on standard
sed.

Also, man pages do not mention anything about it and do not say what characters
can be used to separate commands in a `{ ... }' group.

-- 
Pierre Gaumond.        gaumondp@ERE.UMontreal.CA
Services Informatiques, Universite de Montreal. 
C.P. 6128, Succursale "A", Montreal,            
Quebec, Canada.   H3C 3J7                       
Technical Details
Message-ID: <1993Feb4.155053.11494@cc.umontreal.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!usenet.coe.montana.edu!mintaka.lcs.mit.edu!ai-lab!prep.ai.mit.edu!gnulists

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 100159,e1b5628cc1d02db8,start
X-Google-Attributes: gid100159,public
X-Google-Thread: 10f1ff,e1b5628cc1d02db8,start
X-Google-Attributes: gid10f1ff,public
X-Google-Thread: f72b0,e1b5628cc1d02db8,start
X-Google-Attributes: gidf72b0,public
X-Google-ArrivalTime: 1993-02-04 07:50:53 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!usenet.coe.montana.edu!mintaka.lcs.mit.edu!ai-lab!prep.ai.mit.edu!gnulists
From: gaumondp@ere.umontreal.ca (Gaumond Pierre)
Newsgroups: comp.sys.sgi.misc,comp.unix.misc,gnu.utils.bug
Subject: sed: `{ ... }' groups and labels
Keywords: sed
Message-ID: <1993Feb4.155053.11494@cc.umontreal.ca>
Date: 4 Feb 93 15:50:53 GMT
Article-I.D.: cc.1993Feb4.155053.11494
Followup-To: comp.sys.sgi.misc,comp.unix.misc,gnu.utils.bug
Distribution: world
Organization: Universite de Montreal
Lines: 28
Approved: info-gnu@prep.ai.mit.edu
Apparently-To: uunet!gnu-utils-bug