delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/05/09/07:45:06

From: "Peter S Tillier" <peter_tillier AT despammed DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gawk 3.1.1: bug in stdout redirection on WinNT 4.0
Date: Fri, 9 May 2003 12:41:48 +0100
Organization: BT
Lines: 79
Message-ID: <b9g4jp$9d9$1@pheidippides.axion.bt.co.uk>
References: <3EB7C0D6 DOT 7030206 AT lml DOT ls DOT fi DOT upm DOT es> <9003-Tue06May2003200634+0300-eliz AT elta DOT co DOT il> <3EB8F9A6 DOT 4050307 AT lml DOT ls DOT fi DOT upm DOT es> <2427-Wed07May2003165629+0300-eliz AT elta DOT co DOT il> <3EBA4A19 DOT 9090902 AT lml DOT ls DOT fi DOT upm DOT es>
NNTP-Posting-Host: 10.243.198.223
X-Trace: pheidippides.axion.bt.co.uk 1052480953 9641 10.243.198.223 (9 May 2003 11:49:13 GMT)
X-Complaints-To: postmaster AT axion DOT bt DOT co DOT uk
NNTP-Posting-Date: 9 May 2003 11:49:13 GMT
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Manuel Collado" <m DOT collado AT lml DOT ls DOT fi DOT upm DOT es> wrote in message
news:3EBA4A19 DOT 9090902 AT lml DOT ls DOT fi DOT upm DOT es...
> Eli Zaretskii wrote:
> [snip]
> > Then please show an example of this bug that doesn't use
command-line
> > argument quoting.
>
> F:\PRUEBAS\gawkbug>cat bbbb
> BEGIN { print "bbbb" }
>
> F:\PRUEBAS\gawkbug>cat gawkbug.bat
> @echo off
> echo aaaaaaaaaaaaaaaaaaaaaaa > out.txt
> gawk -f bbbb >> out.txt
> echo -----------------------
> type out.txt
> echo -----------------------
> gawk --version
>
> F:\PRUEBAS\gawkbug>gawkbug
> -----------------------
> bbbb                            <======== overwritten
> aaaaaaaaaaaaaaaaa
> -----------------------
> GNU Awk 3.1.1
> Copyright (C) 1989, 1991-2002 Free Software Foundation....
>
>
> F:\PRUEBAS\gawkbug>gawkbug
> -----------------------
> aaaaaaaaaaaaaaaaaaaaaaa
> bbbb                            <======== appended
> -----------------------
> GNU Awk 3.0.6
> Copyright (C) 1989, 1991-2000 Free Software Foundation....
>
>

Just tried this on W2K Sp3 and got the following results using
CMD.EXE as the shell:

D:\djgpp\home\pt>cat gawkbug.bat
@echo off
echo aaaaaaaaaaaaaaaaaaaaaaa > out.txt
gawk -f bbbb >> out.txt
echo -----------------------
type out.txt
echo -----------------------
gawk --version | head -3


D:\djgpp\home\pt>gawkbug
-----------------------
aaaaaaaaaaaaaaaaaaaaaaa
bbbb
-----------------------
GNU Awk 3.1.1
Copyright (C) 1989, 1991-2002 Free Software Foundation.

D:\djgpp\home\pt>

This seems OK to me.  So there's a problem with the NT4 shell
redirections, not gawk, AFAICS.  Perhaps the DJGPP command line
processing code doesn't work correctly with NT4 SP6's cmd.exe that
you are running.  Is is the original SP6 or SP6a?  ISTR that there
were some problems with SP6 because SP6a arrived pretty soon after
SP6.

BTW I also tried it under W2K SP3's command.com and it works fine
there too.  Sorry I don't have NT4 SP6 access to try it there.

HTH
--
Peter S Tillier
'This post represents the views of the author and does
not necessarily accurately represent the views of BT.'


- Raw text -


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