From owner-freebsd-questions Mon May 6 2:13: 6 2002 Delivered-To: freebsd-questions@freebsd.org Received: from cpimssmtpu11.email.msn.com (cpimssmtpu11.email.msn.com [207.46.181.86]) by hub.freebsd.org (Postfix) with ESMTP id EA0D737B404 for ; Mon, 6 May 2002 02:12:59 -0700 (PDT) Received: from thebe ([67.24.56.33]) by cpimssmtpu11.email.msn.com with Microsoft SMTPSVC(5.0.2195.4617); Mon, 6 May 2002 02:12:58 -0700 From: "Aaron Burke" To: "FreeBSD-Questions" Subject: FW: such a pain Date: Mon, 6 May 2002 02:12:32 -0700 Message-ID: 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.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal X-OriginalArrivalTime: 06 May 2002 09:12:59.0205 (UTC) FILETIME=[37602750:01C1F4DE] 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 Oops, I guess I should have typed my infor in this mail huh? (oops) Here it is. unix2dos actually installes both programs. Check for yourself. To add CR-LF I use 'unix2dos filename', and to chang it back to just CR I use 'dos2unix filename' > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Aaron Burke > Sent: Monday, May 06, 2002 02:01 AM > To: FreeBSD-Questions; Maildrop > Subject: RE: such a pain > > > > > > -----Original Message----- > > From: owner-freebsd-questions@FreeBSD.ORG > > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Maildrop > > Sent: Sunday, May 05, 2002 12:06 AM > > To: Jeff Mitchell; shubhamr@malkauns.nsc.com; questions@FreeBSD.ORG > > Subject: RE: such a pain > > > > > > > > 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 > > > > 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