expand changing DOS line endings to Unix line endings

Gerrit P. Haase gp@familiehaase.de
Mon Jan 3 10:58:00 GMT 2005


David Christensen wrote:
> Gerrit P. Haase wrote:
>>I took the textfile from the attachment which has actually two \r\n
>>at the end which are 78 bytes at all:
> Thanks for your suggestion.  I believe my copy of textfile.txt has one
> CRLF pair at the end, and the length is 76 bytes:

Maybe an issue with your or my mailer?


> I do not understand the subtleties of Cygwin textmode mounts and binmode
> mounts.  I do not recall taking any actions to affect this parameter --
> my habit is to simply download Cygwin setup.exe, download packages to
> the local disk, and install packages from the local disk.  When I
> suspect my Cygwin installation is corrupt, I rename C:\cygwin, do a
> fresh download/ download/ install cycle, and move over my data.  (Maybe
> I need to do this again?)

Default setting is 'binmode' at the third setup.exe panel where you 
define the 'Default Text File Type' -> 'Unix'  *or*  'DOS'

>>... please install coreutils to replace all these three packages.
> Using ftp:://planetmirror.com, 5.2.1-4 appears to be the most recent
> version of coreutils and it looks like I already have it installed (also
> confirmed by the attached cygcheck.out).  The three previous mirrors on
> the list also indicate 5.2.1-4 is current.  Is there a newer release?
> Do I need to find a better mirror?

I don't saw it in your cygcheck?

 From your first posting with this subject:
[...]
clear                1.0-1
cron                 3.0.1-13
[...]

Latest posting includes now:
[...]
clear                1.0-1
coreutils            5.2.1-4
cron                 3.0.1-15
[...]


> Reinstalling coreutils 5.2.1-4 anyway does not cure the problem:

Ok.


> dpchrist@p42800e:~$ grep dump .bashrc
> alias dump='od -Ad -tc'
> dpchrist@p42800e:~$ dump 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
> dpchrist@p42800e:~$ expand textfile.txt > textfile.out
> dpchrist@p42800e:~$ dump textfile.out
> 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


Confirmed.  I see the same behaviour.  So expand defaults to write
output in binmode.  Is this the expected behaviour, Corinna?


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/



More information about the Cygwin mailing list