This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "od" wrong line endings and byte count


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@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...

Brian

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]