From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsrv.cs.umass.edu (mailsrv.cs.umass.edu [128.119.240.136]) by sourceware.org (Postfix) with ESMTPS id 7E89F3858413 for ; Wed, 15 Sep 2021 21:43:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E89F3858413 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cs.umass.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.umass.edu Received: from [192.168.50.218] (c-24-62-201-179.hsd1.ma.comcast.net [24.62.201.179]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id E5F27401DC94; Wed, 15 Sep 2021 17:43:54 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: Previously-functional gawk script now failing to execute - PLEASE HELP!!! To: Bryan VanSchouwen , cygwin@cygwin.com References: From: Eliot Moss Message-ID: <0d8ec2c3-742f-393d-ac56-aaa24f5ad798@cs.umass.edu> Date: Wed, 15 Sep 2021 17:43:54 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.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: , X-List-Received-Date: Wed, 15 Sep 2021 21:43:58 -0000 On 9/15/2021 5:11 PM, Bryan VanSchouwen via Cygwin wrote: > Hello. > > I just tried executing an old, previously-functional awk script using a > version of gawk that I had downloaded last year, and a command of the > following format (as recommended in a previous communication with the > Cygwin mailing list): > gawk -vRS="\r\n" -f data_collect_e_-_FF_4-state.awk > but this time, the script failed to execute!! > > Upon closer examination, the script appears to be failing after > successfully reading the first line of data from the input data file, even > though the input file has NOT been modified since it was last used. (I > should point out that while the files were copied over from my old > computer, another awk script execution that I had attempted recently with > older files worked fine!) Ignoring the shouting :-) ... That command line assumes that the program will see \r\n at the end of each line of input. That is indeed the usual line ending on Windows. However! Since it is not the usual line ending on Posix (what Cygwin aims to be like), there are various options/flags that can affect an internal translation that effectively changes \r\n to \n, or something like that. Others will be able to supply the details more readily than I, but I would look at the environment variable and startup options to Cygwin around this point and see where that leads you. Regards - Eliot Moss