Re: Simple join of 2 lines!!! Arrgh!

From: Carlos J. G. Duarte (cjgd_at_clix.pt)
Date: 01/30/04


Date: Fri, 30 Jan 2004 12:53:18 +0000

Shaun wrote:

> so I thought I'd just replace EOLXXXX (+newline) with nothing, i.e. delete it thus:
>
> tr -d 'EOLXXXX\012' <file1 >file2
>
> but for some reason this removes all newline characters?

tr -d 'character set' will remove these characteres from input.
This is best done with sed:
$ sed 's/EOLXXX.*$//; N; s/\n/ /'

-- 
carlos ** http://cgd.sdf-eu.org


Relevant Pages

  • Re: POS Printer
    ... printer These special codes are non-printable ... characters ... I see no reason to be concerned with it at all. ... I know that a POS printer has an internal buffer so just because we send ...
    (microsoft.public.vc.mfc)
  • Re: What is the maximal length of usernames on Solaris?
    ... You've just made the determination that eight characters is it ... >> that this is a reason not to try and change it. ... >> I don't know how many times I've been preaching the merits of UNIX to ... >for updating all the apps and spending it on his bonus. ...
    (comp.sys.sun.admin)
  • Re: Y&R Tuesdays Show
    ... for not a very good reason except corporate mandate. ... I find Victor compelling when he's in cold/angry mode...but I ... Many actors/actresses have said that they'd much rather play evil than ... long-tenured characters that don't learn from their mistakes. ...
    (rec.arts.tv.soaps.cbs)
  • Re: Layering: For a moment, she stood in silence
    ... then pull back to the present time scene. ... reason to talk about it, and you have to get that across _before_ ... just that with this rambling, there's nothing new for the characters. ...
    (rec.arts.sf.composition)
  • Re: Wolf In The Fold - Plot, New Effect
    ... [For some reason I got this post with absurdly long lines, ... I'll have a fair number of points with the joke based on the Federation treating Argelius ... if the point needed to be made with our characters rather than ...
    (rec.arts.startrek.tech)