www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <41D89D49.2030500@familiehaase.de> |
Date: | Mon, 03 Jan 2005 02:18:01 +0100 |
From: | "Gerrit P. Haase" <gp AT familiehaase DOT de> |
Organization: | Esse keine toten Tiere |
User-Agent: | Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.3) Gecko/20040910 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: "od" wrong line endings and byte count |
References: | <md5:D42EEB8CEB984E746A145DFAC65B6B03> <41D85ABB DOT DCC5BCD9 AT dessent DOT net> |
In-Reply-To: | <41D85ABB.DCC5BCD9@dessent.net> |
X-IsSubscribed: | yes |
Brian Dessent wrote: > David Christensen wrote: > >>cygwin: >> >>When I create a file using notepad: >> >> This is a text file created with Notepad. >> It has DOS (CRLF) line endings. >> >>Look at it using "wc": >> >> dpchrist AT p42800e:~$ wc textfile.txt >> 2 14 76 textfile.txt >> >>And then look at it with Cygwin "od", I see: > > > There is nothing wrong here. You installed cygwin with text mode > mounts: > > C:\cygwin / system textmode > C:\cygwin/bin /usr/bin system textmode > C:\cygwin/lib /usr/lib system textmode > .. /cygdrive system textmode,cygdrive > > This means that when a cygwin program reads a file with CRLF endings it > is translated to LF line endings that all unix tools expect. You want > binary mounts if this is not what you desire. See the FAQ for more > info... Hmm, I don't get it. If I create a file with notepad, containing three readable bytes and a linebreak and save this on a textmode mounted directory then I see this: $ wc 123.txt 1 1 5 123.txt $ od -c 123.txt 0000000 1 2 3 \r \n 0000005 $ pwd /perl $ mount | grep /perl H:\perl on /perl type system (textmode) And I see the same result when moving the file to a binary mode mount: $ wc 123.txt 1 1 5 123.txt $ od -c 123.txt 0000000 1 2 3 \r \n 0000005 $ pwd /tmp $ mount | grep /tmp H:\tmp on /tmp type system (binmode) Gerrit -- =^..^= -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |