delorie.com/archives/browse.cgi | search |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=OlTvRDfxbNjxy+1a0nBGzZZa0rSHkgwHtO0YmtAfxuA33jW0+ziSJ | |
4bt33X4oIoReUoxLKw4pO6iVKX0iWi5L9k6+1lrffK9TrasiJ70oKKZknnYotTIp | |
dziEpmkb6JUo7vIaN+tBjHnsERoMngzDGJs+VmHvLm7SWnxAXStkzQ= | |
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:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=wAxprs2jSBd3rGptyEQurRvrYz4=; b=Umbw5SXifAz2dFrkSbIeEPbh/zhR | |
P1NqmZmWOVA+oJvRwCdfY+iIpTXkdz/mgOBz10tKLOIVsRsORacwVtRzFiHMhCu6 | |
zX+ZV9VXqusG+ROcL+U96wgsPKJx16Oz34b///XjlIdQB62K9KKwlNQL5rIeoddT | |
km21tiGhblnr/AA= | |
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=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Tue, 17 Jun 2014 18:02:39 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: GNU Awk 4.0.1: Cygwin's awk is filtering CR from the input |
Message-ID: | <20140617160239.GU23700@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <CAPBo6a=vvLVVPb8qD+araAF6UeP67u-RmNxnRhbORYHdTNc78A AT mail DOT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <CAPBo6a=vvLVVPb8qD+araAF6UeP67u-RmNxnRhbORYHdTNc78A@mail.gmail.com> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--HrsILUyxNtiOryfc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jun 17 10:57, James Calfee wrote: > "It seems like the issue is awk specific under Cygwin. I tried a few > different things and it seems that awk is silently treating replacing > \r\n with \n in the input data." >=20 > See stack overflow ticket #24251296 > titled: does-awk-cr-lf-handling-break-on-cygwin >=20 > Unfortunately the spam filter rejects links to stack overflow (already > a spam filtered site) >=20 > On Linux (good, we have cr and nl) > $ echo $'line1\r\nline2'|awk 1|od -a > 0000000 l i n e 1 cr nl l i n e 2 nl > 0000015 >=20 > On Cygwin or MSYS (bad, we have only a cr) > $ echo $'line1\r\nline2'|awk 1|od -a > 0000000 l i n e 1 nl l i n e 2 nl > 0000014 This is by design. The Cygwin version of gawk is by default always writing POSIX line endings to stdout. Try using the BINMODE option: echo $'line1\r\nline2'|awk -v BINMODE=3D1 1|od -a Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --HrsILUyxNtiOryfc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJToGafAAoJEPU2Bp2uRE+gYqoP/igDT35VS7o3vsrk3rTFA74C AcS/LvNu8o3LzjNIiiXc8vwPHfV9tPrVP1gKu119JcfH1f6rBOHHTqTu0LPuAwJm LKyQ15IWzFOM0bQvtiSolqmtg8jHBda6q9J4RpAE/Q6nYwSQW0XcVhCJqoFSVr7t 9fo3ex0bvQgjun6fcflq+eFLUy9rP6UanOwLKk4D6ZwlyjGpLUKYLPUZLtzm23bN k5jKlahEbWgDk6tWeOeYPG7KJ0R0jVoa7KVJjkLuEH+ebyu8iGekI/c/dee34B6g mDGBps7KfjoPay2IQpNci2R8LpNQXp5bpuUnExfS8szHk+cz1dBsyUqDT2aUT41q otalVrOCtUz2tjt+awyooFpPVd8V1BeInk72M2pu61c+rG+mChJaV0uAZ/HgnvSR 4DtoE6xvBBYhJHFSrLQw0BnBg0KUPhwgPwH/vXT02PGEfTdqI/1VJAMExpyW4Gkz YIgk4ixw5OAMtyQdKnE2wBLfFQ7Yy5lH8//tbSGRU1zBnAI8iF8bPcDe4neVhQSH 9a4eBOlo3880zS+YMgAG5zn+5xze0ChERpbIJgHzOYwxgJW39nbhzORPvu3bxP8E lrYVenc1cVJRE6pOacnhMN40eQH4uUavzHAKBTYeA7Cr7ts02jr8GKGrWAR58icV +kIxQS7lUiT/MbBP4Kz7 =/ZpJ -----END PGP SIGNATURE----- --HrsILUyxNtiOryfc--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |