Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Feb 1998 21:16:33 -0600
From:      Dan Nelson <dnelson@emsphone.com>
To:        George Vagner <kf7nn@mutsgo.dyn.ml.org>, questions@FreeBSD.ORG
Subject:   Re: creating file without <CR>
Message-ID:  <19980219211633.62074@emsphone.com>
In-Reply-To: <199802200125.TAA02646@mutsgo.dyn.ml.org>; from "George Vagner" on Thu Feb 19 19:25:08 GMT 1998
References:  <199802200125.TAA02646@mutsgo.dyn.ml.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<CR>, and you need them joined, but with the first two <CR>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



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