🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1863

How to strip A NEWLINE

#1863
From: Brian J. Smith
Date: Fri, 30 Nov 1990 05:28
43 lines
2339 bytes
When TFM fails, when all the books I have fail, I run to netland.

I have searched high and low for the answer on how to strip a NEWLINE
charactor from a file.  Well not really a NEWLINE char, but a ":\\\n"
(colon,back-slash,newline).  I have tried useing sed with:

	sed 's/:\\\n//' file

and using the RS variable in awk, but to no avail.  sed will remove
the colon and the back-slash, but not the newline.

Here is the section of code that I am playing with.

#
ps301d|bigps|qms|QMS-2210 in E301D:\
	:lp=/dev/ttyb:sd=/var/spool/ps301d:\
	:af=/var/adm/ps301d.acct:lf=/var/spool/ps301d/errs:\
	:br#9600:rw:fc#0000374:fs#0000003:xc#0:xs#0040040:\
	:mx#0:rg=printer:sf:sh:\
	:if=/local/lib/ps/psif:of=/local/lib/ps/psof:\
	:cf=/cis/reef/wp42/bin/wplpr:df=/local/lib/ps/psdf:\
	:gf=/local/lib/ps/psgf:nf=/local/lib/ps/psnf:\
	:rf=/local/lib/ps/psrf:tf=/local/lib/ps/pstf:\
	:vf=/local/lib/ps/psvf:
#

This is what I want the file to look like after the (colon,back-slash,newline)
has been striped.  As you can see what I really want is to strip a 
(colon,back-slash,newline,tab), but if someone could just get rid of that 
darn newline for me I would be *very* happy.

#
ps301d|bigps|qms|QMS-2210 in E301D:lp=/dev/ttyb:sd=/var/spool/ps301d:af=/var/adm/ps301d.acct:lf=/var/spool/ps301d/errs:br#9600:rw:fc#0000374:fs#0000003:xc#0:xs#0040040:mx#0:rg=printer:sf:sh:if=/local/lib/ps/psif:of=/local/lib/ps/psof:cf=/cis/reef/wp42/bin/wplpr:df=/local/lib/ps/psdf:gf=/local/lib/ps/psgf:nf=/local/lib/ps/psnf:rf=/local/lib/ps/psrf:tf=/local/lib/ps/pstf:vf=/local/lib/ps/psvf:
#

I know that perl can most likely solve this probelm nicely, so I am willing to
hear of any responses, but for standardaztion I would like to use only standard
unix filters.  Sorry Larry.
--
Brian J. Smith					Work: 904-392-1183
CIS Sys Admin Staff				301 CSE Building
bjs@cis.ufl.edu					Univ of Florida, 32612
Technical Details
Message-ID: <25665@uflorida.cis.ufl.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!uflorida!bjs@reef.cis.ufl.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!uflorida!bjs@reef.cis.ufl.edu
From: bjs@reef.cis.ufl.edu (Brian J. Smith)
Newsgroups: comp.unix.shell
Subject: How to strip A NEWLINE
Message-ID: <25665@uflorida.cis.ufl.EDU>
Date: 30 Nov 90 05:28:59 GMT
Sender: news@uflorida.cis.ufl.EDU
Organization: University of Florida CIS Unix Consulting Staff
Lines: 43