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" References: From: Norton Allen 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: Content-Language: en-US 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit 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 line endings. Cygwin's gawk expects just , so the gets wrapped into the regular line text. Your ", 0" is not replacing the beginning of the line, it is overprinting it after the . -- 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