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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Roger Krebs
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




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

cygcheck_2.8.2.txt (69K) Download Attachment
cygcheck_1.7.33.txt (56K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

David Macek
On 2. 8. 2017 17:34, Roger Krebs wrote:
> 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.

See announcements:

* <https://cygwin.com/ml/cygwin-announce/2017-02/msg00036.html> for sed
* <https://cygwin.com/ml/cygwin-announce/2017-02/msg00035.html> for grep
* <https://cygwin.com/ml/cygwin-announce/2017-02/msg00034.html> for gawk

There was also a discussion about these changes at <https://cygwin.com/ml/cygwin/2017-06/msg00040.html>.

--
David Macek


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Roger Krebs
Hi,

I've seen that there were some changes regarding CR/LLF in sed and cygcheck, but I havn't recognized that several other tool has also changed their behavior in the past. We haven't done an update for a longer period of time (why update when anything runs well) and therefor now we've been faced with several similar changes in the behavior of different tools. That's the reason why we've thought that this must be something general.

Many thanks to bring me into the right context. We've made some smaller changes in our scripts and everything seems to work fine now.

Again many thanks for the very quick and helpful response.

Best Regards
Roger Krebs

-----Urspr√ľngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von David Macek
Gesendet: Mittwoch, 2. August 2017 17:46
An: [hidden email]
Betreff: Re: when using cygwin version 2.8.2 the behavior of CR/LF changed completely compared to previous versions

On 2. 8. 2017 17:34, Roger Krebs wrote:
> 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.

See announcements:

* <https://cygwin.com/ml/cygwin-announce/2017-02/msg00036.html> for sed
* <https://cygwin.com/ml/cygwin-announce/2017-02/msg00035.html> for grep
* <https://cygwin.com/ml/cygwin-announce/2017-02/msg00034.html> for gawk

There was also a discussion about these changes at <https://cygwin.com/ml/cygwin/2017-06/msg00040.html>.

--
David Macek


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

Loading...