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":

        [EMAIL PROTECTED]:~$ wc textfile.txt
              2      14      76 textfile.txt


And then look at it with Cygwin "od", I see:

[EMAIL PROTECTED]:~$ od -Ad -tc textfile.txt
0000000   T   h   i   s       i   s       a       t   e   x   t       f
0000016   i   l   e       c   r   e   a   t   e   d       w   i   t   h
0000032       N   o   t   e   p   a   d   .  \n   I   t       h   a   s
0000048       D   O   S       (   C   R   L   F   )       l   i   n   e
0000064       e   n   d   i   n   g   s   .  \n
0000074

Note the incorrect line endings ("\n") and byte count (74).


When I look at the same file using "od" from
http://unxutils.sourceforge.net/, I see:

[EMAIL PROTECTED]:~$ od-unxutils -Ad -tc textfile.txt
0000000   T   h   i   s       i   s       a       t   e   x   t       f
0000016   i   l   e       c   r   e   a   t   e   d       w   i   t   h
0000032       N   o   t   e   p   a   d   .  \r  \n   I   t       h   a
0000048   s       D   O   S       (   C   R   L   F   )       l   i   n
0000064   e       e   n   d   i   n   g   s   .  \r  \n
0000076


Note the correct line endings ("\r \n") and byte count.


David

Attachment: cygcheck.out
Description: Binary data

This is a text file created with Notepad.
It has DOS (CRLF) line endings.

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

Reply via email to