🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3540

Newsgroups: comp.editors

#3540
From: Greg Tarsa
Date: Thu, 13 Apr 1989 15:26
29 lines
1516 bytes
I have been using SED for years and never knew that it was possible
to separate commands on the same line with semi-colons.  Thanks to 
Joe Grace for the new information!

In return, I wanted to suggest to people a method I have found for
placing comments in SED scripts.  This works even better in combination

	0i\	This is a commented version of Joe Grace's solution \
		to the problem posed by Susan Maxwell \

	H;	0s** append pattern space to hold space *
	${;	0s** at end of line. . .*
	    x;			  0s** exchange pattern and hold spaces *
	    s@^\(.\)\(.*\)@\2\1@; 0s** Obvious to the casual observer *
	    s@PROMPT>\n>\n<\n@@g; 0s** Equally obvious *
	    s@\n$@@;		  0s** Remove last newline, removing line *
	    p;			  0s** print the pattern space *
	}

Perhaps we can now usher in the era of annotated SED scripts.

Happy stream editing,
Greg Tarsa
 
Tarsa Software Consulting
--------------------------------
		33 Seabee Street
		Bedford, NH 03102	tarsa@elijah.mv.com
		(603)668-9226		{decuac,decvax}!elijah!tarsa
Technical Details
Message-ID: <4714@decvax.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!abyss.zk3.dec.com!tarsa

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!abyss.zk3.dec.com!tarsa
From: tarsa@abyss.zk3.dec.com (Greg Tarsa)
Newsgroups: comp.editors
Subject: Newsgroups: comp.editors
Keywords: SED comments
Message-ID: <4714@decvax.dec.com>
Date: 13 Apr 89 15:26:45 GMT
Sender: news@decvax.dec.com
Reply-To: tarsa@elijah.mv.com
Followup-To: tarsa@elijah.mv.com
Organization: Tarsa Software Consulting
Lines: 29