From owner-freebsd-questions Fri Nov 2 17: 0:44 2001 Delivered-To: freebsd-questions@freebsd.org Received: from chmls20.mediaone.net (chmls20.mediaone.net [24.147.1.156]) by hub.freebsd.org (Postfix) with ESMTP id EABC237B40C for ; Fri, 2 Nov 2001 17:00:40 -0800 (PST) Received: from sickness (test4.peter.Metro2000.NET [216.177.0.48]) by chmls20.mediaone.net (8.11.1/8.11.1) with ESMTP id fA311Zx28508 for ; Fri, 2 Nov 2001 20:01:35 -0500 (EST) From: "David Loszewski" To: Subject: RE: ^M on end of lines Date: Fri, 2 Nov 2001 19:59:46 -0500 Message-ID: <003a01c16402$d5101e00$3000b1d8@sickness> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <00a401c163fe$94084ee0$0164a8c0@daemon> Importance: Normal 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 Maybe the question I should be asking instead is, is it normal to see a crap load of '^M's in a file in FreeBSD? Dave -----Original Message----- From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG] On Behalf Of undergra Sent: Friday, November 02, 2001 7:28 PM To: Andreas Ntaflos; David Loszewski Cc: freebsd-questions@FreeBSD.ORG Subject: RE: ^M on end of lines tr -d "\015" < input-file > output-file ----- Mensaje original ----- De: "Andreas Ntaflos" Para: "David Loszewski" CC: Enviado: s=E1bado, 03 de noviembre de 2001 0:44 Asunto: Re: ^M on end of lines > On Fri, Nov 02, 2001 at 05:43:18PM -0500, David Loszewski wrote: > > Yea, but then I have to do that to all the files > > Not pretty when you have a 100 files > > > > Dave > > > >> a simple fix after dl is to open it up in vi and do > >> :%s,^V^M,,g > >> > >> -r > > The following perl command issued on the CLI will get > rid of these annoying ^Ms. > > # perl -e -i -p 's/\r\n/\n/s' filename > > you can use wildcards too. > > There are also ports to solve these problems, like dos2unix. > > regards > -- > Andreas "ant" Ntaflos > ntaflos.andreas@gmx.net > Vienna, AUSTRIA > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message