From owner-freebsd-questions Sun May 6 11:23: 3 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tomts14-srv.bellnexxia.net (tomts14.bellnexxia.net [209.226.175.35]) by hub.freebsd.org (Postfix) with ESMTP id 32B3B37B422 for ; Sun, 6 May 2001 11:23:00 -0700 (PDT) (envelope-from matt@gsicomp.on.ca) Received: from xena.gsicomp.on.ca ([64.228.153.241]) by tomts14-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20010506182259.GOXF28559.tomts14-srv.bellnexxia.net@xena.gsicomp.on.ca>; Sun, 6 May 2001 14:22:59 -0400 Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by xena.gsicomp.on.ca (8.11.1/8.11.1) with SMTP id f46IKNN33909; Sun, 6 May 2001 14:20:23 -0400 (EDT) (envelope-from matt@gsicomp.on.ca) Message-ID: <001e01c0d658$d15700e0$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Christopher Leigh" , References: <20010506181546.11982.qmail@lubbockcomputer.com> Subject: Re: how to remove ^M from files with tr? Date: Sun, 6 May 2001 14:17:31 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > hi. > > i'd like to remove ^M from files with tr, but i don't know how to do it. > > 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. Won't that tr line remove the \n AND the \r? I think you should just use tr -d \\0015 < file.txt > file.txt.unix. Alternatively, check out the dos2unix port. -- Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message