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.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 Subject: Re: Previously-functional gawk script now failing to execute - PLEASE HELP!!! To: Bryan VanSchouwen , cygwin AT cygwin DOT 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-Language: en-US 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 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: , Reply-To: moss AT cs DOT umass DOT edu Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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 -- 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