🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #403

sed 1.02 - Bug with { } ?

#403
From: Rob McMahon
Date: Sun, 03 Sep 1989 21:00
19 lines
1211 bytes
I hope this is the right place for this.  Sed version 1.02 with the line:

sed -e "/^$logname:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/" -e "q"
-e "}" -e "d"

prints the first line of the file instead of an extract from the line
beginning with $logname (this is from rn/Pnews.header).  If you change it to

sed -e "/^$logname:/{" -e "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/"
-e "q" -e "}" -e "d"

it prints the extract from the first line instead of the required line, so it
looks like the { } are being ignored.

Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv@uk.ac.warwick             ARPA:   cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
Technical Details
Message-ID: <203@titania.warwick.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcsun!ukc!warwick!cudcv

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcsun!ukc!warwick!cudcv
From: cudcv@warwick.ac.uk (Rob McMahon)
Newsgroups: gnu.utils.bug
Subject: sed 1.02 - Bug with { } ?
Message-ID: <203@titania.warwick.ac.uk>
Date: 3 Sep 89 21:00:44 GMT
Reply-To: cudcv@warwick.ac.uk (latbten:@@z6edNusXr7U:2691:6::/sol/la/tbt/en:/bin/csh)
Organization: Computing Services, Warwick University, UK
Lines: 19