open the file and delete it... :)  deep

On Wed, 28 Apr 1999, Klas Axelsson wrote:

> Where is also a ^Z at the end of the file, that
> you may want to get rid of.
> 
>   /Klas
> 
> > -----Original Message-----
> > From: Molenda, Mark P [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 28, 1999 4:48 PM
> > To: 'Shane Kerr'
> > Cc: '[EMAIL PROTECTED]'
> > Subject: RE: need a prg like dos2unix
> > 
> > 
> > Or you could....
> > 
> > substitute "filename" for your file
> > 
> > cat filename | tr -d '\15' > newfilename
> > 
> > 
> > -----Original Message-----
> > From: Shane Kerr [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 28, 1999 10:39 AM
> > To: linux
> > Cc: Mailing List
> > Subject: Re: need a prg like dos2unix
> > 
> > 
> > On Wed, 28 Apr 1999, linux wrote:
> > 
> > > Someone mentioned one last week, but I dont remember the name of the
> > > program.
> > > 
> > > Basically need a prg that strips the ^M and other MS crap 
> > from txt files
> > 
> > You don't need a special program for this.  Try:
> > 
> > perl -pe 's/\r$//' < input > output
> > 
> > Perl is fun! Whee!!!  (This is actually probably better 
> > handled in "sed",
> > but I don't know sed, and since I have Perl, why would I 
> > bother learning
> > it?)
> > 
> > Shane
> > 
> 

Reply via email to