RE: Using SED to get rid of ^M at the end of every file line

RE: Using SED to get rid of ^M at the end of every file line

 

  

hpux has dos2ux and ux2dos.

> -----Original Message-----
> From: Concannon, Eugenia [mailto:eugenia.[Email Address Removed] Sent: Thursday, August 15, 2002 11:22 AM
> To: LazyDBA.com Discussion
> Subject: RE: Using SED to get rid of ^M at the end of every file line
>
>
>
> solaris has a "dos2unix" and a "unix2dos" to handle this
> problem. not true
> for hp unix.
> -----Original Message-----
> From: Peace On Earth [mailto:[Email Address Removed] Sent: Thursday, August 15, 2002 8:34 AM
> To: LazyDBA.com Discussion
> Subject: RE: Using SED to get rid of ^M at the end of every file line
>
>
> Sometimes finding utils is a painful experience. If
> you do not have the utility create a shell script
> ...say xxx
>
> and in the script have
>
> sed 's/^M//g' $1
>
> Make sure the ^M is created with first pressing CTRL-V
> and then CTRL-M. Save the file, give it execute privs
> and then you can just use
>
> xxx <filename>
>
> and this should do it as well.
>
> Riz
>
> --- "Anderson, Brian" <[Email Address Removed] wrote:
> > Everybody seems to be giving you all kinds of fancy
> > scripts to do this.
> >
> > I usually just use the UNIX command for this exact
> > thing.
> >
> > HPUX: dos2ux
> > Solaris: dos2unix
> >
> > Check /usr/bin for others.
> >
> >
> > > -----Original Message-----
> > > From: James.D.[Email Address Removed] > [mailto:James.D.[Email Address Removed] > > Sent: Wednesday, August 14, 2002 1:36 PM
> > > To: LazyDBA.com Discussion
> > > Subject: Using SED to get rid of ^M at the end of
> > every file line
> > >
> > >
> > > Hi all,
> > >
> > > Any one know a good way to get rid of ^M at the
> > end of every line of a
> > > file? I'd like to automate this using SED if I
> > could.
> > >
Oracle LazyDBA home page