Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Jun 2001 23:11:43 -0400
From:      Jim Conner <jconner@enterit.com>
To:        "Mark Sergeant" <msergeant@snsonline.net>
Cc:        Jason Oakley <waulok@bangrocks.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: __ how to eliminate "^M" in ASCII files.
Message-ID:  <5.1.0.14.0.20010607230633.0243f6b8@mail.enterit.com>
In-Reply-To: <200106080225.f582Peh25860@xyzzy.intranet.snsonline.net>
References:  <Pine.BSF.4.21.0106081219460.27417-100000@snsonline.net> <Pine.BSF.4.21.0106081219460.27417-100000@snsonline.net>

next in thread | previous in thread | raw e-mail | index | archive | help
$ $(locate dos2unix | head -1) file1 > file2

or

$ sed 's/\015//g' file1 > file2

:)

- Jim

At 09:25 PM 6/7/2001 -0500, Mark Sergeant wrote:
>I use this...
>
>#!/bin/sh
>echo ""
>echo "Removing Windows silly ^M's for the following files..."
>echo ""
>for file in $*; do
>         echo ---- $file
>         tr -d "\015" < $file > $file.$$
>         cp $file.$$ $file
>         rm -f $file.$$
>done
>echo ""
>exit 0
>
>Works wonderfully and can do many files at once.
>
>Cheers,
>
>Mark
>
>On Fri, 8 Jun 2001 12:20:38 +1000 (EST), Jason Oakley said:
>
> > save them with UNIX line ends (A handy feature of Arachnophilia
> >  www.arachnoid.com).  Or do a search and replace in your favourite text
> >  editor.
> >
> >  VI:
> >
> >  %s/^V^M//g
> >
> >
> >  On Fri, 8 Jun 2001, bsdnewbie bsdnewbie wrote:
> >
> >  ]:Is there any tool can eliminate "^M" in text files?
> >  ]:Thanks in advance.
> >  ]:
> >  ]:best regards,
> >  ]:steven
> > 
> ]:_________________________________________________________________________
> >  ]:Get Your Private, Free E-mail from MSN Hotmail at 
> http://www.hotmail.com.
> >  ]:
> >  ]:
> >  ]:To Unsubscribe: send mail to majordomo@FreeBSD.org
> >  ]:with "unsubscribe freebsd-questions" in the body of the message
> >  ]:
> >
> >
> >  ----------------------------
> >  You should be Banging Rocks!
> >    http://www.bangrocks.com
> >               _
> >           .oO(_)Oo.
> >
> >    I'd far rather be happy
> >      than right, any day.
> >
> >
> >  To Unsubscribe: send mail to majordomo@FreeBSD.org
> >  with "unsubscribe freebsd-questions" in the body of the message
> >
> >
>
>--
>Mark Sergeant
>Unix Systems Administrator
>
>Fortune follows...
>
>Chicago Transit Authority Rider's Rule #36:
>         Never ever ask the tough looking gentleman wearing El Rukn
>headgear where he got his "pyramid powered pizza warmer".
>                 -- Chicago Reader 3/27/81
>
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message


- Jim
- NOTJames
- jconner@enterit.com

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- | Today's errors, in contrast:                                           |
- | Windows - "Invalid page fault in module kernel32.dll at 0032:A16F2935" |
- | UNIX    - "segmentation fault - core dumped"                           |
- | Humans  - "OOPS, I've fallen and I can't get up"                       |
- --------------------------------------------------------------------------
- (To view this properly use a non-proportional font in your MUA)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.0.20010607230633.0243f6b8>