Luis Baars on Wed, 29 Mar 2000 13:03:50 -0500 (EST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Silly Emacs Question


Greg,

I deal with this almost everyday at work, except I have to put the ^Ms into files instead of taking them out (some weird thing with MS-DOS batch files needing extra embedded new line characters in order to run the batch file....go figure, it's Microsoft).

Another way to remove the new line characters (if you have a Windows machine available) is to ftp the file over to the Windows machine in binary mode, then ftp it back to your linux box in ascii mode.

Hope this helps.

Luis

----Original Message Follows----
From: Jason Lenthe <lenthe@mailhost.sju.edu>
Reply-To: plug@lists.nothinbut.net
To: plug@lists.nothinbut.net
Subject: Re: [PLUG] Silly Emacs Question
Date: Wed, 29 Mar 2000 08:34:15 -0500 (EST)

If you edit a file under windows, then edit it under linux (vi or emacs or
whatever) you'll see those ^M s.  My favorite way of getting rid of them is
to do

cat myfile | tr -d '\r' > out
mv out myfile

You can always inspect out before you overwrite the original to make sure
you got it right.

Jason

You wrote:

Started using emacs and it seems to put a ^m at the end of each line.
How do I stop this?  I have a shell (tcsh) where I am setting some
environment vars (setenv) and this ^m shows up in all.   Realize this is
not strictly Linux.

Greg

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


______________________________________________________________________ Philadelphia Linux Users Group - http://plug.nothinbut.net Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce General Discussion - http://lists.nothinbut.net/mail/listinfo/plug