From owner-freebsd-questions@FreeBSD.ORG Mon Jun 1 22:55:39 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C80081065670 for ; Mon, 1 Jun 2009 22:55:39 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (aristotle.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id 6809B8FC15 for ; Mon, 1 Jun 2009 22:55:39 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id n51MuhO5013563; Mon, 1 Jun 2009 15:56:43 -0700 (PDT) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Mon, 1 Jun 2009 15:55:34 -0700 (PDT) Date: Mon, 1 Jun 2009 15:55:34 -0700 From: Gary Kline To: Nikos Vassiliadis Message-ID: <20090601225534.GA13614@thought.org> References: <20090601213610.GA13395@thought.org> <4A2450BF.4070802@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A2450BF.4070802@gmx.com> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 22++ years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org Cc: Wojciech Puchar , FreeBSD Mailing List Subject: Re: is there a program to joinlines? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 22:55:40 -0000 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 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