[techtalk] dos to unix

Conor Daly conor.daly at oceanfree.net
Mon Sep 11 19:58:32 EST 2000


On Mon, Sep 11, 2000 at 04:31:29PM +0100 or so it is rumoured hereabouts, 
Conor Daly thought:
> On Sun, Sep 10, 2000 at 05:34:55PM -0700 or so it is rumoured hereabouts, 
> Nancy Corbett thought:
> > 
> > I know I've seen someone use a command something like dostounix to convert
> > text docs written with something like notepad, etc into plain ol ascii... 
> > 
> > I have a bunch of perl scripts I just inherited and they have a ^M at the
> > end of every line.  I know I could just do a command in vi to get rid of
> > them, but I've ben straining my brain (not a difficult thing to do
> > today) to remember that dostounix thingie.  If it is just dostounix, it
> > seems that my shell acct with my ISP doesn't know what that is. Grrr.
> > 
> 
> man tr
> 
> then 
> 
> cat file-with-
> -characters | tr -d <CTRL+v><ENTER>  >
> file-without-
> -characters
> 
Oops!  that should have read

cat file-with-^M-characters | tr -d <CTRL+v><ENTER>  > file-without-^M-characters

<ctrl+v><enter> will insert the actual ^M character in the command.
Otherwise, you need to work out the hex or octal equivalent of the
character (either 0x010 or 0x013 AFAIR) and give that as an arg to tr

> thassit.
> 

-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)




More information about the Techtalk mailing list