From owner-freebsd-questions Sat May 4 23:55:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mplspop6.mpls.uswest.net (mplspop6.mpls.uswest.net [204.147.80.9]) by hub.freebsd.org (Postfix) with SMTP id 1177937B41C for ; Sat, 4 May 2002 23:55:12 -0700 (PDT) Received: (qmail 42500 invoked from network); 5 May 2002 06:55:11 -0000 Received: from unknown (HELO jenny) (63.231.238.225) by mplspop6.mpls.uswest.net with SMTP; 5 May 2002 06:55:11 -0000 Date: Sun, 5 May 2002 02:05:48 -0500 Message-ID: From: "Maildrop" To: "Jeff Mitchell" , shubhamr@malkauns.nsc.com, "questions@FreeBSD.ORG" Subject: RE: such a pain MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20020505050051.60490.qmail@web21502.mail.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 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 Also besides the methods alright stated, there is a program in "ports" projected called "dos2unix" (or "unix2dos", I forget). After you have it installed, do a: dos2unix blah.c > /tmp/blah.c mv /tmp/blah.c ./blah.c you could even create a script like the one I use: #!/bin/sh dos2unix $1 > /tmp/.tmpfile.c cp /tmp/.tmpfile.c ./$1 Call it something like convert.sh and run it like this: convert.sh filename.c than just do `vi filename.c` and all the ^M's are gone. Regards, Jack > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Jeff Mitchell > Sent: Sunday, May 05, 2002 12:01 AM > To: shubhamr@malkauns.nsc.com; questions@FreeBSD.ORG > Subject: Re: such a pain > > > > --- shubhamr wrote: > > Hi, > > I have some .c files which I got from my windows machine.But when I > > read > > it on BSD,for every line end ^M shows up,whereever there is a > > newline(carriage return).It is tedious to remove them manually.I have > > no > > X installed on my BSD.Can anyone suggest how to get rid of them? > > > > shubha > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > perl -p -i -e 's(\015\012)(\012)' file1 file2 file3 ... > > Regards, > Jeff > > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Health - your guide to health and wellness > http://health.yahoo.com > > 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