public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Jannick" <thirdedition@gmx.net>
To: <cygwin@cygwin.com>
Cc: "'Vermessung AVT - Wolfgang Rieger'" <w.rieger@avt.at>
Subject: RE: gawk 4.1.4: CR separate char for CRLF files
Date: Tue, 15 Aug 2017 15:41:00 -0000	[thread overview]
Message-ID: <009a01d315dc$d8ad49a0$8a07dce0$@gmx.net> (raw)
In-Reply-To: <AB495CE313664A489959F8DEF45069A901ABFC2D4B@EXSRV01.avt-imst.local>

Hi Wolfgang,

First of all, many thanks for your interesting experience report and the
constructive 
remarks.

On Mon, 14 Aug 2017 10:36:23 +0000, Vermessung AVT - Wolfgang Rieger wrote:
> Another solution which we have been using for many years now, though it
> might not be feasible for you:

Yes, you are right, unfortunately: We make extensive use of gawk extensions
to  
upgraded with gawk in tandem. Thus we will move forward with the ongoing 
gawk development.

> We very rarely update Cygwin. We have been using Cygwin for some 15+
> years now. We use tools like gawk (hundreds of scripts), head, tail, sort,
etc.
> that we are using in shell scripts running under cmd.exe (no Unix shells
> involved). I soon realized that upgrades of Cygwin may cause troubles with
> existing scripts, so we only update if we really need to (e.g.: New
> functionality that would be important, 32 to 64 bit shift, eventually new
> Windows versions, bugs we needed to be fixed).
> 
> I have followed the discussions about the CR/LF behaviour changes in the
> past attentively and decided not to update in near future, because that
> would lead to a massive problem with many hundreds of scripts - hoping
> that sometimes there will be a change in gawk again.

Agree - this is the same setting here. Furthermore, we run our heavy
processes 
on a semi-annual basis within a more than tight time frame. So cygwin's
update
came pretty much out of the blue in the late minute, because since the last
reporting cycle we have not used gawk. An unpleasant surprise with heavy 
potential time issues if we had not taken the decision on how to deal with
the 
changed situation. And as you are saying below ...

> What is Unix-like or OS-like or Posix-like behaviour in that context? You
could
> argue that gawk interprets line endings like the underlying OS does (i.
e.,
> gawk reads LF in Unix and CR/LF in Win), or it interprets line endings in
a
> Unix-style no matter of the underlying OS used. That's a developer's
decision
> in my opinion.

True. And the developers of gawk opted - with a heavy heart I believe - to 
have gawk swallow CRs.

> But since with pipes or output redirection gawk used to write no CRs even
in
> previous versions, we already had the problem that gawk had to accept
> *both* inputs, LF with or without CR. That worked widely fine so far,
since
> most Windows and other application SW we use accept both record formats,
> fortunately (we had issues with SW upgrades of other vendors no longer
> accepting pure LF, but that only concerned a very small number of
scripts).
> With the new approach in Cygwin that seems to be broken, so we did not
> upgrade Cygwin since then (we currently use gawk 4.1.3).

Yes, this is our basis of SW selection process as well, but we march with
gawk's
version as it nicely develops needing a gawk version reading files and pipes

of any LF and CRLF kind out of the box.

> Of course the reason for that really annoying CR/LF thing is the arrogance
> and ignorance of MS, which caused innumerable of useless developers'
> hours when I think of the endless discussions and changes in Cygwin; but
MS
> is the one who defines the standards because of its very market power, so
> we have to deal with it, if we like or not. I'd definitely prefer to use
Unix for
> its powerful tools, but most of the SW we use is simply not available for
Unix,
> and MS does not provide gawk etc. So we have to deal with that CR/LF issue
> in a pragmatic rather than in a more, say, philosophical approach: We need
> to run our scripts with as little changes as possible. So that's why we
upgrade
> Cygwin as seldom as possible. It is a "living system", yes, which is great
on
> the one side - but can be annoying in everyday practice.

We are squared into the Windows world as well. So there's no way out of
that.
So far I was more than happy that the gawk code comes with the feature to
silently 
swallow CRs (cf. the code reference with the exact code line in my previous 
posting) and that was used until the last update. Now that things - from our

point of view - tremendously changed, we were urged to run a decision
process
looking at alternatives (I listed in my first email). The evaluation in the
past
days led us to the decision to use another source of bilingual versions of
gawk 
and friends (i.e. they read CRLF and CR without any additional hint). This
is what
the user can opt for.

> In my opinion there should be at least an option for gawk to accept both
LF
> and CR/LF line endings equally, preferably with a system variable so that
> there is no need to change the command line call of gawk at all. That's
what I
> vote for.

Fully agree - for this I would have been pretty much in favor as well.
Something
close to this I was having in mind in my first posting.
  
> Kind regards,
> Wolfgang

Best regards,
J.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2017-08-15 15:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 10:36 Vermessung AVT - Wolfgang Rieger
2017-08-15 15:41 ` Jannick [this message]
2017-08-15 16:43 ` Achim Gratz
  -- strict thread matches above, loose matches on Subject: below --
2017-08-16 12:50 cyg Simple
2017-08-16 12:19 Vermessung AVT - Wolfgang Rieger
2017-08-16 12:09 Vermessung AVT - Wolfgang Rieger
2017-08-16 12:26 ` Eric Blake
2017-08-08 23:16 Jannick
2017-08-08 23:23 ` Steven Penny
2017-08-09  0:49   ` Jannick
2017-08-09  7:03     ` AW: " Roger Krebs
2017-08-09  8:38       ` Jannick
2017-08-09 11:03         ` Eric Blake
2017-08-09 19:09           ` Eric Blake
2017-08-10 12:04             ` cyg Simple
2017-08-10 12:31               ` David Macek
2017-08-10 14:46                 ` cyg Simple
2017-08-10 18:35                   ` Steven Penny
2017-08-10 21:34                     ` Brian Inglis
2017-08-10 21:49                       ` cyg Simple
2017-08-10 22:49                         ` Brian Inglis
2017-08-11 12:47                           ` cyg Simple
2017-08-11 16:54                             ` Brian Inglis
2017-08-11 17:06                               ` cyg Simple
2017-08-10 22:22                       ` Steven Penny
2017-08-10 22:49                         ` Brian Inglis
2017-08-10 23:59                           ` Steven Penny

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='009a01d315dc$d8ad49a0$8a07dce0$@gmx.net' \
    --to=thirdedition@gmx.net \
    --cc=cygwin@cygwin.com \
    --cc=w.rieger@avt.at \
    /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).