🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #260

getting sed to put linefeed in output stream

#260
From: Bill Michel
Date: Thu, 11 Oct 1990 02:43
11 lines
954 bytes
I want to put a newline in my output with sed. Something like

sed "/NAME */NAME \n/" inputfile

in other words, replace each occurrence of NAME followed by one or more
spaces with NAME followed by a newline. \n doesn't quite seem to do
it, however, and I get a literal "n" in my output. I have been able
to embed a carriage return (^M) but not a linefeed (it doesn't show
up as a control character, but rather, breaks the line in the script.

HELP!
Technical Details
Message-ID: <2199@megadon.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!ucsd!ames!vsi1!altos!megadon!clp
References: <3713@zorba.Tynan.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!ucsd!ames!vsi1!altos!megadon!clp
From: bm@bike2work.Eng.Sun.COM (Bill Michel)
Newsgroups: comp.unix
Subject: getting sed to put linefeed in output stream
Keywords: malloc, free, sbrk, heap, swap
Message-ID: <2199@megadon.UUCP>
Date: 11 Oct 90 02:43:36 GMT
References: <3713@zorba.Tynan.COM>
Sender: clp@megadon.UUCP
Organization: Sun Microsystems, Mt. View, Ca.
Lines: 11
Approved: clp@megadon.UUCP