From owner-freebsd-questions Wed Feb 26 9: 8: 0 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DC8537B401 for ; Wed, 26 Feb 2003 09:07:59 -0800 (PST) Received: from aibo.runbox.com (snoopy.runbox.com [193.71.199.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1187B43F85 for ; Wed, 26 Feb 2003 09:07:58 -0800 (PST) (envelope-from klimenta@runbox.com) Received: from [10.9.9.110] (helo=snoopy.runbox.com) by lufsen.runbox.com with esmtp (Exim 4.12) id 18o52B-0001EV-00 for freebsd-questions@FreeBSD.ORG; Wed, 26 Feb 2003 18:07:55 +0100 Received: from [12.33.76.83] (helo=bigbeat) (Authenticated Sender=klimenta@runbox.com) by snoopy.runbox.com with asmtp (Exim 4.12) id 18o513-0007mH-00 for freebsd-questions@FreeBSD.ORG; Wed, 26 Feb 2003 18:06:45 +0100 Message-ID: <001601c2ddb9$ce9e14f0$ca0110ac@vinyl.tkvbp.com> Reply-To: "Kliment Andreev" From: "Kliment Andreev" To: References: <20030226175613.5e61f45e.tijl@ulyssis.org> <200302261901.15799.will@unfoldings.net> Subject: Re: cat Date: Wed, 26 Feb 2003 12:09:19 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-5" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Sender: 202020 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > I want to remove CRs from text files so what I did is this: > > > > cat filename | tr -d '\r' > filename > > It's easier with 'tr' but you can also use vi. # vi text.txt :1,$s/^M//g where ^M means that you need to hit Ctrl-V. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message