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]

when using cygwin version 2.8.2 the behavior of CR/LF changed completely compared to previous versions


Hi,

after updating from version 1.7.33 to version 2.8.2 the behavior of CR-LF handling completely changed. This results in several srcipt errors etc.

Two examples:
1) using wmic together with grep
================================
Executing "wmic process get ExecutablePath,processID,commandline /FORMAT:CSV | od -t a" shows that each line from the output of wmic ends with CR CR LF. That's normal and works in the same way under both cygwin versions.
Executing "wmic process get ExecutablePath,processID,commandline /FORMAT:CSV | grep "," |od -t a" has different outputs. Under version 1.7.33 the lines ends with LF, under version 2.8.2 the lines still ends with CR CR LF.
If you use cut to extract the last field (the processID) you will get the pure processID (number) under version 1.7.33 but the processID followed by CR CR (string) under version 2.8.2.
When using grep CR characters at the end of the line should usually be cut of to make sure the $ sign can be used in regexp as end of line marker.

2) using awk and reading from DOS files
=======================================
When reading number values from a DOS file (each line contains only a number) using awk and writing this number into an array variable works perfectly under version 1.7.33. But under version 2.8.2 all array variables are filled with the number followed by a CR.
   { WebOrderID[$1] = NR; }
This issue can be solved by defining RS="\r\n" in the BEGIN section of the awk script. But in the past it works fine without setting the record separator.

In addition we have now problems using svn under cygwin: when using a working copy that isn't located on a local drive but on a remote (SMB) filing system it will not recognized as working copy anymore. Error message: <folder xyz> isn't a valid working copy. Doing exact the same (for example "svn info") from a machine with cygwin 1.7.33 installed everything works fine.

First I was unsure if something general has changed since version 1.7.33 that has to be taken into account now. But after spending hours on reading mail list, FAQ and searching the internet without finding a solution I assume, this may be an error in cygwin. Especially because it's one of the key features of cygwin to map CR LF <=> LF on the fly.

I've also downgraded the cygwin.dd to version 2.8.1.1 without any change in the behavior. And it doesn't matter, if it is a fresh install of version 2.8.2 or an update from a previous version.

Also the mount point hasn't changed
Version 1.7.33
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,noacl,posix=0,noumount,auto)

Version 2.8.2:
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,noacl,posix=0,noumount,auto)

Attached you will find the "cygcheck -sv" output from version 2.8.2 as well as from the previously used version 1.7.33 (it's still installed on some machines).

Best Regards

Roger Krebs


Attachment: cygcheck_2.8.2.txt
Description: cygcheck_2.8.2.txt

Attachment: cygcheck_1.7.33.txt
Description: cygcheck_1.7.33.txt

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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