public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Norton Allen <allen@huarp.harvard.edu>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: GAWK Incorrect Data Display
Date: Sun, 20 Dec 2020 07:19:34 -0500	[thread overview]
Message-ID: <8aaa6927-34db-e61c-052d-519a23231009@huarp.harvard.edu> (raw)
In-Reply-To: <b948aa3b-78b5-c4ad-47b5-f3ded93f8bfc@t-online.de>

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



      reply	other threads:[~2020-12-20 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19 23:34 Jason McGee
2020-12-19 23:51 ` Jason McGee
2020-12-20  0:16 ` Hans-Bernhard Bröker
2020-12-20 12:19   ` Norton Allen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8aaa6927-34db-e61c-052d-519a23231009@huarp.harvard.edu \
    --to=allen@huarp.harvard.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).