delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/15/17:35:06

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: Problem with gawk-3.1.5-3
Date: Wed, 15 Mar 2006 17:34:55 -0500
Message-ID: <31DDB7BE4BF41D4888D41709C476B6570246AE2E@NIHCESMLBX5.nih.gov>
From: "Buchbinder, Barry \(NIH/NIAID\) [E]" <BBuchbinder AT niaid DOT nih DOT gov>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k2FMZ3D1027900

Corinna Vinschen wrote:
> On Mar 13 17:30, Buchbinder, Barry (NIH/NIAID) [E] wrote:
>> I have a gawk script that I've been using unchanged for at least 9
>> months that seems to have broken with the transition from
>> gawk-3.1.5-2 to gawk-3.1.5-3. 
>> 
>> Gawk seemed to hang, though it might be merely very slow.  I let it
>> run for hours before killing it.  gawk-3.1.5-2 took 20-30 seconds to
>> run. 
> 
> Weird.  The difference between gawk-3.1.5-2 and gawk-3.1.5-3 is in
> theory only the fact that -2 missed to make CRLF->LF conversion on
> stdin while -3 does CRLF->LF conversion.  
> 
>> This is the script, if that makes a difference.  It is in the middle
>> of a pipe, receiving input from sort and giving output to another
>> instance of sort.  Everything should have unix-style line-endings.
>> The pipe is running under ash.  The script actually used a tab
>> character instead of the "\t" escape sequence.  I changed it to "\t"
>> below in the hope that that might be easier to read in this email.
>> 
>>   gawk '  BEGIN   { FS = OFS = "\t" }
>>                   {
>>                   Key = $2 "\t" $3 "\t" $4
>>                   InfoNew[Key] = $5
>>                   DateNew[Key] = $1
>>                   if (InfoOld[Key] == "") {
>>                           InfoOld[Key] = InfoNew[Key]
>>                           DateOld[Key] = DateNew[Key] }
>>                   if (InfoNew[Key] != InfoOld[Key]) {
>>                           print DateOld[Key], Key, InfoOld[Key]
>>                           InfoOld[Key] = InfoNew[Key]
>>                           DateOld[Key] = DateNew[Key] }             
>>           } END     {
>>                   for (Key in InfoOld) {
>>                           print DateOld[Key], Key, InfoOld[Key] }   
>> }' 
>> 
>> Do I need to send anything else?
> 
> Can you embed this in a minimal testscript to reproduce the effect,
> together with a few lines (<10) of a typical input file? 
> 
> Corinna
> 
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin
> to 
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat

Sorry to have bothered you about this.

I did comparison tests with gawk-3.1.5-2 and gawk-3.1.5-3.  Playing with
"print" statements I found that gawk was not hanging.  Timing was not
consistently different between gawk-3.1.5-2 and gawk-3.1.5-3, so the
unexpectedly long run times must have been do to other reasons.  (As
this is Windows, on a network, and I don't have admin privileges, its
hard to say what those other reasons might be.)

Anyway, I apologize again for having raised a false alarm.

And thanks for all the great work everyone has done on cygwin!

- Barry

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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