X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Peter Klavins" To: References: <729528 DOT 66694 DOT qm AT web36807 DOT mail DOT mud DOT yahoo DOT com> In-Reply-To: <729528.66694.qm@web36807.mail.mud.yahoo.com> Subject: RE: end of file characters Date: Sun, 2 Dec 2007 19:20:11 +0100 Message-ID: <006f01c8350f$fbc40bd0$f34c2370$@net.au> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-au Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > I went with the defaults when installing cygwin. Which means I used > the recommended unix/binary line feed setting. It sounded like that > means I get no line-ending translation done by cygwin, which is fine. > > So I open a .bat file and see a bunch of ^Ms at the end of each line. > Then I open a xml file and don't see them. I was expecting to see > the > ^Ms again as the xml file, just like the bat file, was created in a > windows environment. Is this normal? Even within the Windows environment if often happens that files don't have cr-lf line endings. This is especially the case, for example, when you have saved the file from the internet. And even if you've edited the file using a Windows editor, they quite often sense the line ending format and write the file back using the same format. So, yes, it is possible that you may see .bat files with Ctrl-M's and .xml files without them. > Another question... When I'm editing a file that has the ^Ms do I > leave them alone, or delete them? Will I be able to go back and forth > and > use vi via cygwin, and notepad/textpad via windows without harming the > file? In general, you don't really need to delete Ctrl-M's, so long as the files are working fine as they are. Vi happily reads and writes files with lines with or without Ctrl-M's. You'll find that Notepad is useless in editing files without Ctrl-M's, because it treats them as one long line. But WordPad works fine. If you must delete the additional Ctrl-M's, don't do it by hand within an editor, you may accidentally leave one in, which may potentially later confuse the hell out of an editor, or you. Use a program like unix2dos/dos2unix to do that work for you. Peter K. ------------------------------------------------------------------------ Peter Klavins Datalon SrL -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/