From owner-freebsd-questions@FreeBSD.ORG Mon Jun 1 22:07:01 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 22CC210656A4 for ; Mon, 1 Jun 2009 22:07:01 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mail.gmx.com (unknown [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 684198FC16 for ; Mon, 1 Jun 2009 22:07:00 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: (qmail invoked by alias); 01 Jun 2009 22:06:58 -0000 Received: from ipa13.13.107.79.tellas.gr (EHLO [192.168.254.1]) [79.107.13.13] by mail.gmx.com (mp-eu001) with SMTP; 02 Jun 2009 00:06:58 +0200 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX18oABM7SeYoTIgwCD/meNB/erAz8T9KRZckedpJEw Ycl3VN8qqH89oW Message-ID: <4A2450BF.4070802@gmx.com> Date: Tue, 02 Jun 2009 01:05:51 +0300 From: Nikos Vassiliadis User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Wojciech Puchar References: <20090601213610.GA13395@thought.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.72 Cc: Gary Kline , 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:07:04 -0000 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