Web lists-archives.com

Re: [ANNOUNCEMENT] TEST RELEASE: gawk-4.1.4-3




On Tue, 14 Feb 2017 13:23:40, Corinna Vinschen wrote:
> this TEST release removes all enforcing of text mode on input.
> Input from pipes is now treated binary-only, input from files
> follows the mount mode setting text/binary.

Works great, thanks.

    $ printf 'hello world\r\n' | awk 1 | od -tcx1
    0000000   h   e   l   l   o       w   o   r   l   d  \r  \n
             68  65  6c  6c  6f  20  77  6f  72  6c  64  0d  0a


Ironically, Awk is now a portable way to convert line endings, as d2u is not
portable:

    printf 'hello world\r\n' | awk '{sub("\r", "")} 1'
    printf 'hello world\n' | awk '{sub(/$/, "\r")} 1'


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