delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/09/15/17:44:14

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 <vanschbm2 AT gmail DOT com>, cygwin AT cygwin DOT com
References: <CAC7Qdh0tn4L9BzvRV6xKXaB6EUMRjPWLsaoK=bVdphfJa6NKiQ AT mail DOT gmail DOT com>
From: Eliot Moss <moss AT cs DOT umass DOT edu>
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: <CAC7Qdh0tn4L9BzvRV6xKXaB6EUMRjPWLsaoK=bVdphfJa6NKiQ@mail.gmail.com>
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
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>
Reply-To: moss AT cs DOT umass DOT edu
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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

- Raw text -


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