Date: Tue, 02 Jun 2009 01:05:51 +0300 From: Nikos Vassiliadis <nvass9573@gmx.com> To: Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl> Cc: Gary Kline <kline@thought.org>, FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: is there a program to joinlines? Message-ID: <4A2450BF.4070802@gmx.com> In-Reply-To: <alpine.BSF.2.00.0906012347280.33657@wojtek.tensor.gdynia.pl> References: <20090601213610.GA13395@thought.org> <alpine.BSF.2.00.0906012347280.33657@wojtek.tensor.gdynia.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A2450BF.4070802>