From owner-freebsd-questions Sun May 6 11:22: 5 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.dada.it (mail2.dada.it [195.110.96.69]) by hub.freebsd.org (Postfix) with SMTP id 476CB37B423 for ; Sun, 6 May 2001 11:22:02 -0700 (PDT) (envelope-from ale@unixmania.net) Received: (qmail 20590 invoked from network); 6 May 2001 18:21:56 -0000 Received: from unknown (HELO libero.sunshine.ale) (195.110.114.252) by mail.dada.it with SMTP; 6 May 2001 18:21:56 -0000 Received: by libero.sunshine.ale (Postfix, from userid 1001) id 984405EC8; Sun, 6 May 2001 20:22:00 +0200 (CEST) Date: Sun, 6 May 2001 20:22:00 +0200 From: Alessandro de Manzano To: Christopher Leigh Cc: freebsd-questions@freebsd.org Subject: Re: how to remove ^M from files with tr? Message-ID: <20010506202200.A738@libero.sunshine.ale> Reply-To: Alessandro de Manzano References: <20010506181546.11982.qmail@lubbockcomputer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010506181546.11982.qmail@lubbockcomputer.com>; from clcont@lubbockcomputer.com on Sun, May 06, 2001 at 06:15:46PM -0000 X-Operating-System: FreeBSD 4.3-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, May 06, 2001 at 06:15:46PM -0000, Christopher Leigh wrote: > i *THINK*, i'm not sure if my memory serves me right, but... > > tr -d \\015\\012 < file.txt > file.txt.unix > > worked in linux, but it won't work in freebsd. Why are you removing linefeeds (\012 , 0x0a, '\n') too ? to remove ^M (carriage returns, 0x0d, '\r') you just need \015 I did a little experiment here and worked. -- bye! Ale ale@unixmania.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message