This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [ANNOUNCEMENT] Updated [test]: sed-4.4-1
- From: Steven Penny <svnpenn at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 11 Feb 2017 15:01:21 -0800 (PST)
- Subject: Re: [ANNOUNCEMENT] Updated [test]: sed-4.4-1
- Authentication-results: sourceware.org; auth=none
- References: <announce.fef1110c-ac22-0877-6602-ae7f0acb7e54@redhat.com>
On Sat, 11 Feb 2017 11:06:17, "Eric Blake (cygwin)" wrote:
> I made a tweak that no longer automatically strips carriage returns from
> input on binary mounts
This is great, but can we do it for Awk too?
$ printf 'hello world\r\n' | awk 1 | od -tcx1
0000000 h e l l o w o r l d \n
68 65 6c 6c 6f 20 77 6f 72 6c 64 0a
Currently you have to make this awful incantation:
$ unset POSIXLY_CORRECT
$ printf 'hello world\r\n' | awk -vBINMODE=1 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
BINMODE only gets parsed on the command line; it is not recognized even in the
BEGIN section. This makes it impossible to write portable Awk scripts with
respect to carriage returns.
--
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