delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/12/20/07:20:25

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 221CA3861031
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=huarp.harvard.edu
Authentication-Results: sourceware.org;
spf=pass smtp.mailfrom=allen AT huarp DOT harvard DOT edu
Subject: Re: GAWK Incorrect Data Display
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
References: <DM6PR12MB2922892E5E2BE6301BDAC818BBC20 AT DM6PR12MB2922 DOT namprd12 DOT prod DOT outlook DOT com>
<b948aa3b-78b5-c4ad-47b5-f3ded93f8bfc AT t-online DOT de>
From: Norton Allen <allen AT huarp DOT harvard DOT edu>
Message-ID: <8aaa6927-34db-e61c-052d-519a23231009@huarp.harvard.edu>
Date: Sun, 20 Dec 2020 07:19:34 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.5.1
MIME-Version: 1.0
In-Reply-To: <b948aa3b-78b5-c4ad-47b5-f3ded93f8bfc@t-online.de>
X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 0BKCK3cb013461

On 12/19/2020 7:16 PM, Hans-Bernhard Bröker wrote:
> Am 20.12.2020 um 00:34 schrieb Jason McGee via Cygwin:
>> I confirmed there is not a problem with my code by comparing Cygwin 
>> against Gawk for Windows.
>
> Your presentation of the problem is quite unclear, but the root cause 
> is almost certainly not in the code, but in the data.
>
> You're bound to be feeding Windows text files to a Unix tool.  You 
> need to reformat the file to Unix format.
>
I agree. The input likely has <cr><lf> line endings. Cygwin's gawk 
expects just <lf>, so the <cr> gets wrapped into the regular line text. 
Your ", 0" is not replacing the beginning of the line, it is 
overprinting it after the <cr>.


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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