delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/03/05/11:03:42

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:mime-version:content-type
:content-transfer-encoding:message-id:date:to:subject; q=dns; s=
default; b=B7y644/GLrEeCBBgYNpm2gYxNdDcOtUQW2JnFKbh/8D3KKAnotwAt
i+yPizcIGIReq/kl90pRW069kxpDNgP8TaEbjG10/fpgiduQ8PUI8+QF5xzq6uoF
v3vKkowHhXdH+XdSyox847helxGINWXrAj3jYs+3d0N/GFB7SeWZlE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:mime-version:content-type
:content-transfer-encoding:message-id:date:to:subject; s=
default; bh=Ta9uqWTwyn2N+OugExJ9kWgVuPs=; b=mdVmWGhf4Ou9ObHuaEwH
eqDhjXk7EI2PzrWH2a05dwxfwzfIZ5xc4+dHQk0GGkze47KYHHk3eSwD79J4c3EA
3pwUC8CBcuqMDOAfXlB08DwppGP0TvszgkpNIkZFly0oE/Z5gKGI8lbgHDsOoQvj
PC6N0h0HjQgS6w+OPZnbMtk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS,T_HK_NAME_FM_DR autolearn=no version=3.3.2 spammy=utterly, sincerely
X-HELO: mail-wr0-f182.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:subject; bh=uHrII2hkbTgadx1RQYGdEV1fXwI6iGdkxLEE23efIj0=; b=LiIm+OxpUiHCnXvyK+KIbYqQRA3XYaMYz3eYsgXpHX7i1BorQHstk9Xcpe408f/JFT OkCm0BDaLonoPJgQ0k8OPjzj3MBAmLR39k+Ck7wjspjd+E8xtzQCiNF0iElRbfwrIID+ ERCzReu+y+7HhaxaFjvX3L3PNBEfqAIt2zZjreF3fxdalWxJ1UvtHngavCr+c4UDgZFj mC0ojNWULzYtzvgnyG9Z380D/ZM7mqWeeJ4fdhATDSX+HkgFWSSThOBZBY+OdTwurKxS 6eBPgnY774WxfZAfJImXRMVTqKym2eL5Hey7pRqZqIiSYKWZzksMU1Xthdh9Wr9VwKH/ foBA==
X-Gm-Message-State: AMke39lR1yBNa98yBYH5FkO/QR0dqrhKQ4zxAXybQ710FQvsfzIOdoH7aR2mkFEtYccaSw==
X-Received: by 10.223.153.17 with SMTP id x17mr10662807wrb.55.1488729800755; Sun, 05 Mar 2017 08:03:20 -0800 (PST)
From: Dr Rainer Woitok <rainer DOT woitok AT gmail DOT com>
X-Google-Original-From: Dr Rainer Woitok <Rainer DOT Woitok AT Gmail DOT Com>
MIME-Version: 1.0
Message-ID: <22716.14013.315000.162049@woitok.gmail.com>
Date: Sun, 5 Mar 2017 17:03:09 +0100
To: cygwin AT cygwin DOT com
Subject: Problems opening pipes in binary mode
X-IsSubscribed: yes

Greetings,

after some discussion the packages "awk", "grep", and "sed" were recent-
ly updated to open pipes  in binary mode only.   I do not want to revive
the discussion about pros and cons,  I just want to make known  how this
change broke one of my scripts.  My script contains the line

   cygcheck -cv | gawk '...'

which now produces  utterly garbled output.   The reason  simply is that
"cygcheck" produces output lines with Windows style line ends.   To test
just run the following:

   $ cygcheck -cv | od -tcx1 | head -4
   0000000   C   y   g   w   i   n       P   a   c   k   a   g   e       I
            43  79  67  77  69  6e  20  50  61  63  6b  61  67  65  20  49
   0000020   n   f   o   r   m   a   t   i   o   n  \r  \n   L   a   s   t
            6e  66  6f  72  6d  61  74  69  6f  6e  0d  0a  4c  61  73  74

So there obviously is at least one Cygwin tool  which uses Windows style
"\r\n" line ends  in its output.   I don't know whether or not there are
any others,  but in my opinion this move to binary mode pipes should not
have been made as long as there are Cygwin tools producing Windows style
line ends.

Sincerely,
  Rainer

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019