From: Lee <ler762@gmail.com>
To: Bryan VanSchouwen <vanschbm2@gmail.com>
Cc: cygwin@cygwin.com
Subject: Re: Previously-functional gawk script now failing to execute - PLEASE HELP!!!
Date: Wed, 15 Sep 2021 19:49:21 -0400 [thread overview]
Message-ID: <CAD8GWss_7aoegPWfrABajS3CCu0oQLsGOy3fijQA11rMnDeEYQ@mail.gmail.com> (raw)
In-Reply-To: <CAC7Qdh0BE-Mm4QgXHgiejtxBUxwbWCZ0XoFd3Jd4U5b283JkCw@mail.gmail.com>
On 9/15/21, 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!!
The data file you attached doesn't have "\r\n" line endings:
$ file rpcg_FF_filtrd.txt
rpcg_FF_filtrd.txt: ASCII text
compare with one that does:
$ file test.txt
test.txt: ASCII text, with CRLF line terminators
<.. snip ..>
> What the heck is going on with this software, and is there a way to fix
> it?!
I don't use RS and start my awk scripts off with
sub("\r$", "", $0) # fix any \r\n line endings
so my scripts work with either flavor of line endings.
If you don't want to change your script try changing your input
unix2dos <your text files>
Regards,
Lee
next prev parent reply other threads:[~2021-09-15 23:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 23:01 Bryan VanSchouwen
2021-09-15 23:49 ` Lee [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-09-15 21:11 Bryan VanSchouwen
2021-09-15 21:33 ` Bill Stewart
2021-09-15 21:43 ` Eliot Moss
2021-09-16 1:58 ` Brian Inglis
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=CAD8GWss_7aoegPWfrABajS3CCu0oQLsGOy3fijQA11rMnDeEYQ@mail.gmail.com \
--to=ler762@gmail.com \
--cc=cygwin@cygwin.com \
--cc=vanschbm2@gmail.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).