This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with gawk-3.1.5-3


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.

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?
____

Perhaps related:  gawk-3.1.5-3.tar.bz2 seems a lot bigger than
gawk-3.1.5-2.tar.bz2.  Might that be something that needs attention?

-rwxr-x---+ 1  630852 2005-11-17 11:51:36 gawk-3.1.5-2.tar.bz2
-rwxr-x---+ 1 1011999 2006-03-13 08:05:25 gawk-3.1.5-3.tar.bz2

- Barry

Barry U. Buchbinder, Ph.D.
Technology Development Associate
Office of Technology Development (OTD)
National Institute of Allergy and Infectious Diseases (NIAID)
National Institutes of Health (NIH)
U.S. Department of Health and Human Services (HHS)

6610 Rockledge Drive, Room 4071, MSC 6606
Bethesda, MD  20892-6606  (Zip Code for Courier:  20817)
301-496-2644 / Fax: 402-7123 / Direct: 594-1696 / Office: Room 4041

mailto:BBuchbinder@niaid.nih.gov
http://www3.niaid.nih.gov/about/organization/odoffices/otd/

The information in this e-mail and any of its attachments is
confidential and may contain sensitive information.  It should not be
used by anyone who is not an intended recipient.  If you have received
this e-mail in error, please inform the sender and delete it from your
mailbox or any other storage devices.  NIAID shall not accept liability
for any statements made that are sender's own and not expressly made on
behalf of the NIAID by one of its representatives.

Attachment: cygcheck.out
Description: cygcheck.out

--
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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]