X-Spam-Check-By: sourceware.org Date: Tue, 14 Mar 2006 10:57:05 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Problem with gawk-3.1.5-3 Message-ID: <20060314095705.GC5887@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <31DDB7BE4BF41D4888D41709C476B6570246AE0C AT NIHCESMLBX5 DOT nih DOT gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31DDB7BE4BF41D4888D41709C476B6570246AE0C@NIHCESMLBX5.nih.gov> User-Agent: Mutt/1.4.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 -- 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/