From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25211 invoked by alias); 11 Feb 2017 23:01:26 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 25186 invoked by uid 89); 11 Feb 2017 23:01:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=awful, BEGIN, H*M:98e2, H*r:6000 X-HELO: mail-oi0-f66.google.com Received: from mail-oi0-f66.google.com (HELO mail-oi0-f66.google.com) (209.85.218.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 11 Feb 2017 23:01:23 +0000 Received: by mail-oi0-f66.google.com with SMTP id u143so4720017oif.3 for ; Sat, 11 Feb 2017 15:01:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:to:subject:references :user-agent; bh=YkkLFiN4pGw7u1B4B2stwrCUCch6qORqT75Qmcm7yuo=; b=QI1/k0F8cH2OLbHzP6aP8p+EX0ndRkTxZEH/shJer6d33IOQz9WcQNdfZSpoi+ze+p gPc5mhDpbeHaLNOb8T/FLn5Sv9hj5H+HDSI3M1UX8Yc5WZI2Z3UDaz0QTv7k82vO/H4g 4QUnkTvzCdUqUQMZQHCMEQKaqI9bsEJf4+vhXDIVcbFPHVXo1Z5fHbSXTAz/mYYp0cbq 0t7HSNwfdPazc7K8LKUalepWayKK0Y5lYhGqmzuYCtgeisdI/RsgSOtj1ZydkAm5+ZG7 844g7iee/o2WK9zrP0Fb+U5FwIRP+SUNy2BeDCVZj0Mm8WBN6Go2evrIXmTotC5fJs6N Anbg== X-Gm-Message-State: AMke39n0GOTu01Y3f4l0Xbb13o/cKARGOs15Yj4NcPpcI5yKzcl7aIjbgqOGs++xdyaGag== X-Received: by 10.202.3.197 with SMTP id 188mr8636367oid.31.1486854082261; Sat, 11 Feb 2017 15:01:22 -0800 (PST) Received: from tmp.RItnoQtnXi ([2605:6000:9fc0:56:811:343f:f904:d318]) by smtp.gmail.com with ESMTPSA id f28sm1688788ote.48.2017.02.11.15.01.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Feb 2017 15:01:21 -0800 (PST) Message-ID: <589f97c1.1c139d0a.60fe5.98e2@mx.google.com> Date: Sat, 11 Feb 2017 23:01:00 -0000 From: Steven Penny X-Google-Original-From: Steven Penny To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] Updated [test]: sed-4.4-1 References: Content-Type: text/plain; charset=UTF-8 User-Agent: Tryst/2.0.1 (github.com/svnpenn/tryst) X-SW-Source: 2017-02/txt/msg00155.txt.bz2 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