Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <41D8A0E8.20906@familiehaase.de>
Date: Mon, 03 Jan 2005 02:33:28 +0100
From: "Gerrit P. Haase" <gp@familiehaase.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: David Christensen <dpchrist@holgerdanske.com>
CC: "'Cygwin List'" <cygwin@cygwin.com>
Subject: Re: expand changing DOS line endings to Unix line endings
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

David Christensen wrote:

you wrote in your second posting with this subject that it is not
resolved, however it works for me.

> I have run Cygwin setup and chosen "DOS" line endings.

Well, I use binary mode mounts but have some textmode mounts for
testing.


> When I create a text file with DOS line endings (CRLF):
> 
>     This is a text file created with Notepad.
>     It has DOS (CRLF) line endings.
> 
> 
> Look at it with (unxutils) "od":
> 
> <CVSENV>dpchrist@p42800e:~$ dump textfile.txt
> 000000   T   h   i   s       i   s       a       t   e   x   t       f
> 000010   i   l   e       c   r   e   a   t   e   d       w   i   t   h
> 000020       N   o   t   e   p   a   d   .  \r  \n   I   t       h   a
> 000030   s       D   O   S       (   C   R   L   F   )       l   i   n
> 000040   e       e   n   d   i   n   g   s   .  \r  \n
> 00004c
> 
> 
> Run it through Cygwin "expand":
> 
>     <CVSENV>dpchrist@p42800e:~$ expand textfile.txt > textfile.out
> 
> 
> And look at the output using (unxutils) "od":
> 
> <CVSENV>dpchrist@p42800e:~$ dump textfile.out
> 000000   T   h   i   s       i   s       a       t   e   x   t       f
> 000010   i   l   e       c   r   e   a   t   e   d       w   i   t   h
> 000020       N   o   t   e   p   a   d   .  \n   I   t       h   a   s
> 000030       D   O   S       (   C   R   L   F   )       l   i   n   e
> 000040       e   n   d   i   n   g   s   .  \n
> 00004a
> 
> Note that the line endings have been changed to Unix ("\n").

I took the textfile from the attachment which has actually two \r\n at
the end which are 78 bytes at all:

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

$ 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   .  \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  \r  \n
0000078

This is on a textmode mount and I see the same on a binmode mount.

It seems that you have updated Cygwin to 1.5.12, but you have not
updated fileutils/sh-utils/textutils, please install coreutils to
replace all these three packages.


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/

