From owner-freebsd-questions Thu Feb 19 19:16:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA26329 for freebsd-questions-outgoing; Thu, 19 Feb 1998 19:16:48 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dan.emsphone.com (dan@dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA26238 for ; Thu, 19 Feb 1998 19:16:39 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.8.6/8.8.6) id VAA28341; Thu, 19 Feb 1998 21:16:34 -0600 (CST) Message-ID: <19980219211633.62074@emsphone.com> Date: Thu, 19 Feb 1998 21:16:33 -0600 From: Dan Nelson To: George Vagner , questions@FreeBSD.ORG Subject: Re: creating file without References: <199802200125.TAA02646@mutsgo.dyn.ml.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199802200125.TAA02646@mutsgo.dyn.ml.org>; from "George Vagner" on Thu Feb 19 19:25:08 GMT 1998 X-OS: FreeBSD 2.2-970701-RELENG Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Feb 19), George Vagner said: > I am trying to merge 3 files together so as to have them on one line > but everything i try keeps inserting carriage returns. > > Needed Example: > > this is file onethis is file2this is file3 > > what i am getting is > > this is file1 > this is file2 > this is file3 Are you saying you have three files, each one line long, ending in , and you need them joined, but with the first two s removed? cat file1 file2 file3 | tr -d "\n" ; echo or paste -d \\0 file1 file2 file3 or echo `cat file1``cat file2``cat file3` I imagine awk, sed, or perl would be able to do the job as well. -Dan Nelson dnelson@emsphone To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message