delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/19/08:09:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <8C6D4989662C304087C58904BAB721A54B73B4@Hermes.astrum.de>
From: Harald Kierer <Harald DOT Kierer AT astrum DOT de>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: awk CR/LF issue
Date: Wed, 19 Feb 2003 14:09:21 +0100
MIME-Version: 1.0

Hi,

I've been complaining about the awk output lately.
Today I tested our old awk (3.0.3) which did what
I expected, in contrast to the new 3.1.1 awk.
So I (finally) searched the archives and found this:

"I've updated the version of GNU awk to 3.1.1-3.

This version is linked against automode.o.  It should solve CR/LF
issues on input."
http://sources.redhat.com/ml/cygwin/2002-09/msg00406.html

I don't know *what* was fixed since I cannot find a changelog
or source, and I don't know which version introduced that
bug since I only have this old 3.0.3 (I think from B20),
but it got worse for me between those versions.

Heres a test case:


[/t] $ mount
t:\bin\cygnus\home on /home type system (binmode)
t:\bin\cygnus\etc on /etc type system (binmode)
t:\bin\cygnus\lib on /usr/lib type system (textmode)
t:\bin\cygnus\lib on /lib type system (binmode)
t:\bin\cygnus\usr on /usr type system (binmode)
t:\bin\cygnus on /bin type system (binmode)
t:\bin\cygnus on /usr/bin type system (textmode)
c: on /c type system (textmode)
d: on /d type system (textmode)
e: on /e type system (textmode)
[more partitions skipped]

[Note that I have some mounts in binmode and some in text]
[Note that my awk is actually gawk]

[/t] $ echo "BEGIN { print \"123\" >> v_Out; print \"456\" >> v_Out; }" >
x.awk

[create simple awk script that outputs some lines]

[/t] $ awk --version
GNU Awk 3.0.3
[snip]
[I'm working on a cygnus 1.3.20 and only replaced the awk for this]

[/t] $ awk -v v_Out="/bin/x" -f x.awk /etc/passwd
[/t] $ notepad `cygpath -w /bin/x`

[the created file has POSIX line endings which is ok since
/bin is mounted as binmode]

[/t] $ awk -v v_Out="/c/x" -f x.awk /etc/passwd
[/t] $ notepad `cygpath -w /c/x`

[the created file has Windows CR/LF because /c is mounted
as textmode]

So the 3.0.3 GNU awk works as expected. awk 3.1.1 does not!
It outputs to POSIX style only, disregarding the mounts.

Since the old awk works as expected on this issue I'd like
to make this a bug report. Me sticks to 3.0.3 for now.

Regards,
 Harry

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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