From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68743 invoked by alias); 9 Aug 2017 07:03:32 -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 67699 invoked by uid 89); 9 Aug 2017 07:03:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,CYGWIN_OWNER_BODY,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:eurprd06, roger, Hx-spam-relays-external:sk:DB6PR06, H*r:sk:DB6PR06 X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0087.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.87) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Aug 2017 07:03:28 +0000 Received: from DB6PR0601MB2085.eurprd06.prod.outlook.com (10.168.56.154) by DB6PR0601MB2087.eurprd06.prod.outlook.com (10.168.57.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Wed, 9 Aug 2017 07:03:25 +0000 Received: from DB6PR0601MB2085.eurprd06.prod.outlook.com ([fe80::99a2:af7d:384c:3209]) by DB6PR0601MB2085.eurprd06.prod.outlook.com ([fe80::99a2:af7d:384c:3209%17]) with mapi id 15.01.1304.027; Wed, 9 Aug 2017 07:03:25 +0000 From: Roger Krebs To: "cygwin@cygwin.com" Subject: AW: gawk 4.1.4: CR separate char for CRLF files Date: Wed, 09 Aug 2017 07:03:00 -0000 Message-ID: References: <004401d3109c$2dcb09e0$89611da0$@gmx.net> <598a47fc.5501ca0a.5476f.0305@mx.google.com> <004701d310a9$372363e0$a56a2ba0$@gmx.net> In-Reply-To: <004701d310a9$372363e0$a56a2ba0$@gmx.net> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Roger.Krebs@stage-entertainment.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0601MB2087;6:ZIC/cX/QGmeHAnNpJ09EPsXz+9UBkudSCMn9zsXCG/7KCIO2udluMFG+BHk2hfrtz3cpousTPG98pG2UV5YkD19BqSoinVB9HL95LwtOcVQt//PTKmjd796QkHF/0wsrBDDbT8O5jtFJY7P+lAqKc1SR4Q3wmC2dHEJBnlox9AcR3+LwKAAnBMs2x7UQx71CQeWEQotAmgkkszn+jGo/Zf66NTZkmcULoheADL/tzOaATlLVwhQZbcPWUNppHHsxW+t6xG12YM2t3th8vGKytQ6sLHIKOjg7TKJ4/zPyKl1McP3ZD1eacKj/PJvoAV9kLd+7lnETtByDVDNZqxfGRQ==;5:G1BE6k/Y56RyaC0hOoeGN6ba7+om9kXPZBLK1ng5AfUixcXrzizAYDwR5B1aior1zI2sOzpNhdlPa7WVjcsKA2AJf5KCLnQ2ca+z54/BF1sWM/isQbd0Q++OP8n3WJOJnhNxUr0hCUYTimzm1O5Elw==;24:EN1dQdJ/uIkUQ+18Ciqkdw9Vu9yUkdarC7Bn5yfZx5TLuA3WnXMDLldB6JN9AynfVE05+h4XzTimOID7zf5R0U4YDCr+AJY8l3B69Rkfst4=;7:AAOt3zMCP33KWvR4wv3wUEBXgJz2gQLOOdGcCUJ3mxyNhYXJo4mC+byG6srwqWHq+bqQOud03Muhww4V8CFX7AUdjbO6LmgNG6EOq+qd8A3jH1cehmXBdCk2TxL/KfhpF23ilpcV0zSdmq0gP6SZuNdPXrwTrd1GN+zZgVaQDLVsbxlSIBuURrBH/D2LH7BBY7LYpi1N7VIKWPMOYjL1g6WlT9w6wGG4w6vecsdBxr0= x-ms-office365-filtering-correlation-id: a6ae95f9-037e-4388-1293-08d4def4bab1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DB6PR0601MB2087; x-ms-traffictypediagnostic: DB6PR0601MB2087: x-exchange-antispam-report-test: UriScan:(20558992708506); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB6PR0601MB2087;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB6PR0601MB2087; x-forefront-prvs: 0394259C80 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39400400002)(39450400003)(39410400002)(39840400002)(199003)(24454002)(189002)(99286003)(2351001)(3660700001)(5250100002)(2501003)(86362001)(5640700003)(25786009)(2900100001)(102836003)(3846002)(6436002)(33656002)(6306002)(2950100002)(55016002)(6916009)(53936002)(6116002)(9686003)(6506006)(189998001)(105586002)(97736004)(53376002)(38730400002)(110136004)(68736007)(74316002)(3280700002)(106356001)(7696004)(2906002)(50986999)(305945005)(14454004)(966005)(7736002)(5660300001)(54356999)(76176999)(81156014)(66066001)(1730700003)(478600001)(8936002)(72206003)(8676002)(101416001)(81166006);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0601MB2087;H:DB6PR0601MB2085.eurprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: stage-entertainment.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: stage-entertainment.com X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Aug 2017 07:03:24.9292 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e51757a1-30a6-4313-99f1-91a899d67e0c X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0601MB2087 X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00094.txt.bz2 Hi, I've added a BEGIN section at the beginning awk sript file setting the reco= rd separator explicitly for the input file (RS) as well as for the output f= ile (ORS): BEGIN { RS=3D"\r\n" ORS=3D"\r\n" } { ... your script } Especially the RS parameter wasn't necessary in the past but now it is. It works in all my cases. The only disadvantage: you have to know what kind= of files you want to handle in the awk script. The same awk script will no= t work for DOS files as well as for linux files. Best Roger -----Urspr=FCngliche Nachricht----- Von: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] Im Auftrag vo= n Jannick Gesendet: Mittwoch, 9. August 2017 02:48 An: cygwin@cygwin.com Betreff: RE: gawk 4.1.4: CR separate char for CRLF files On Tue, 08 Aug 2017 16:23:40 -0700 (PDT), Steven Penny wrote: > On Wed, 9 Aug 2017 01:15:08, "Jannick" wrote: > > the current version 4.1.4 of gawk appears to unpleasantly treat CR for > > CRLF files, i.e. CR is not gracefully swallowed, but is a separate character. > > > > This makes some, if not all, of the scripts we are working with here > > useless, unless the input files are converted to LF which certainly is > > not feasible. IIRC the issue did not show up some versions back. > > > > Is this a bug - or am I missing something here? >=20 > Learn to read: >=20 > http://cygwin.com/ml/cygwin/2017-08/msg00033.html Thanks - quickly done. The link reveals that CRLF/LF conversion is now mandatory to work with cygwin's gawk on DOS machines. As far as I can see there is no legacy solution like for, e.g., sed (-b switch) to have an easy solution for the issue, especially when invoking gawk from makefiles (piping).=20 I consider this bad news while admittedly not fully understanding the whole background of the move which is not necessary for now.=20 -- 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 -- 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