Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jun 2009 15:55:34 -0700
From:      Gary Kline <kline@thought.org>
To:        Nikos Vassiliadis <nvass9573@gmx.com>
Cc:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: is there a program to joinlines?
Message-ID:  <20090601225534.GA13614@thought.org>
In-Reply-To: <4A2450BF.4070802@gmx.com>
References:  <20090601213610.GA13395@thought.org> <alpine.BSF.2.00.0906012347280.33657@wojtek.tensor.gdynia.pl> <4A2450BF.4070802@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 02, 2009 at 01:05:51AM +0300, Nikos Vassiliadis wrote:
> Wojciech Puchar wrote:
> >>    I recently discovered it is a "good thing" to use a utility of 
> >>some kind
> >>    to joing the lines of a vi/vim-created file before using my
> >
> >you mean getting one line from line file+line one from other file and 
> >producing one line of output containing both
> >
> >man paste
> >:)
> 
> I think he means join all lines from a single file,
> to produce a single-line file. In this case, you
> should translate the \n character to space:
> tr '\n' ' ' < /etc/motd
> 
> You could also use:
> echo `tr '\n' ' ' < /etc/motd`
> which will add a final \n, to avoid the funny looking
> output of a text file with no \n at the end.
> 
> Nikos


	You got it, Nikos.  I wrote a C prog that cuts the '\n' and replaces it
	with a blank.  The tr stuff is too much typing:)

	thanks, you guys.

	gary

	PS:  If atom ever gets ported, maybe a 'J' switch should automate what

	jlines <asciifile> jasciifile 

	does.  Suggestions?   (i'm asking because i found there were billions and
	billions of places in my 150K+ story and using jlines makes it a bit
	simpler.  ---At least in english, there are rules for how you quote
	something over paragraphs if the speaker/quote is the same......

	PPS: *NOw*  i'm starting to realize why OOo is so huge!!

	PPPS:   i will make available several chapters of my geek novel
		to the readers of the list online... .



> 

-- 
 Gary Kline  kline@thought.org  http://www.thought.org  Public Service Unix
        http://jottings.thought.org   http://transfinite.thought.org
    The 4.91a release of Jottings: http://jottings.thought.org/index.php




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090601225534.GA13614>