1*e6d6c189SCody Peter Mello# From E.Ab@chem.rug.nl Wed Aug 2 13:16:53 2000 2*e6d6c189SCody Peter Mello# Received: from mail.actcom.co.il 3*e6d6c189SCody Peter Mello# by localhost with POP3 (fetchmail-5.1.2) 4*e6d6c189SCody Peter Mello# for arnold@localhost (single-drop); Wed, 02 Aug 2000 13:16:53 -0400 (EDT) 5*e6d6c189SCody Peter Mello# Received: from lmail.actcom.co.il by actcom.co.il with ESMTP 6*e6d6c189SCody Peter Mello# (8.9.1a/actcom-0.2) id MAA21699 for <arobbins@actcom.co.il>; 7*e6d6c189SCody Peter Mello# Wed, 2 Aug 2000 12:20:38 +0300 (EET DST) 8*e6d6c189SCody Peter Mello# (rfc931-sender: lmail.actcom.co.il [192.114.47.13]) 9*e6d6c189SCody Peter Mello# Received: from freefriends.org (freefriends.org [63.85.55.109]) 10*e6d6c189SCody Peter Mello# by lmail.actcom.co.il (8.9.3/8.9.1) with ESMTP id LAA22723 11*e6d6c189SCody Peter Mello# for <arobbins@actcom.co.il>; Wed, 2 Aug 2000 11:23:22 +0300 12*e6d6c189SCody Peter Mello# Received: from mescaline.gnu.org (mescaline.gnu.org [158.121.106.21]) 13*e6d6c189SCody Peter Mello# by freefriends.org (8.9.3/8.9.3) with ESMTP id FAA23582 14*e6d6c189SCody Peter Mello# for <arnold@skeeve.com>; Wed, 2 Aug 2000 05:18:59 -0400 15*e6d6c189SCody Peter Mello# Received: from dep.chem.rug.nl (dep.chem.rug.nl [129.125.7.81]) 16*e6d6c189SCody Peter Mello# by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id FAA30670; 17*e6d6c189SCody Peter Mello# Wed, 2 Aug 2000 05:20:24 -0400 18*e6d6c189SCody Peter Mello# Received: from rugmd34.chem.rug.nl (rugmd34.chem.rug.nl [129.125.42.34]) 19*e6d6c189SCody Peter Mello# by dep.chem.rug.nl (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA17089; 20*e6d6c189SCody Peter Mello# Wed, 2 Aug 2000 11:20:23 +0200 21*e6d6c189SCody Peter Mello# Received: from chem.rug.nl (localhost [127.0.0.1]) by rugmd34.chem.rug.nl (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id LAA25392; Wed, 2 Aug 2000 11:20:22 +0200 (MDT) 22*e6d6c189SCody Peter Mello# Sender: E.Ab@chem.rug.nl 23*e6d6c189SCody Peter Mello# Message-ID: <3987E7D5.2BDC5FD3@chem.rug.nl> 24*e6d6c189SCody Peter Mello# Date: Wed, 02 Aug 2000 11:20:21 +0200 25*e6d6c189SCody Peter Mello# From: Eiso AB <E.Ab@chem.rug.nl> 26*e6d6c189SCody Peter Mello# X-Mailer: Mozilla 4.72C-SGI [en] (X11; I; IRIX 6.5 IP32) 27*e6d6c189SCody Peter Mello# X-Accept-Language: en 28*e6d6c189SCody Peter Mello# MIME-Version: 1.0 29*e6d6c189SCody Peter Mello# To: bug-gnu-utils@gnu.org, arnold@gnu.org 30*e6d6c189SCody Peter Mello# Subject: bug? [GNU Awk 3.0.5] 31*e6d6c189SCody Peter Mello# 32*e6d6c189SCody Peter Mello# Content-Type: text/plain; charset=us-ascii 33*e6d6c189SCody Peter Mello# Content-Transfer-Encoding: 7bit 34*e6d6c189SCody Peter Mello# X-UIDL: \f8"!(8G!!ZL$#!h>X!! 35*e6d6c189SCody Peter Mello# Status: R 36*e6d6c189SCody Peter Mello# 37*e6d6c189SCody Peter Mello# hi Arnold, 38*e6d6c189SCody Peter Mello# 39*e6d6c189SCody Peter Mello# 40*e6d6c189SCody Peter Mello# Please try the script beneath... 41*e6d6c189SCody Peter Mello# I'm not sure if this is a bug or not, but I would expect 42*e6d6c189SCody Peter Mello# the empty string as an array index just to be treated 43*e6d6c189SCody Peter Mello# like any other string 44*e6d6c189SCody Peter Mello# 45*e6d6c189SCody Peter Mello# so if ("" in ta) would be true, and for ( i in ta ) should loop only once. 46*e6d6c189SCody Peter Mello# 47*e6d6c189SCody Peter MelloBEGIN { 48*e6d6c189SCody Peter Mello v="" 49*e6d6c189SCody Peter Mello ta[v]++ 50*e6d6c189SCody Peter Mello if ( v in ta) print "a",v,++ta[v],ta[v] 51*e6d6c189SCody Peter Mello print "b",v,++ta[v],ta[v] 52*e6d6c189SCody Peter Mello for( i in ta) print "c",++c,i,ta[i] 53*e6d6c189SCody Peter Mello} 54*e6d6c189SCody Peter Mello# 55*e6d6c189SCody Peter Mello# goodluck, Eiso 56*e6d6c189SCody Peter Mello# 57*e6d6c189SCody Peter Mello# -- 58*e6d6c189SCody Peter Mello# _________ 59*e6d6c189SCody Peter Mello# _______________________________/ Eiso AB \_________________________ 60*e6d6c189SCody Peter Mello# 61*e6d6c189SCody Peter Mello# o 62*e6d6c189SCody Peter Mello# 63*e6d6c189SCody Peter Mello# o Dept. of Biochemistry 64*e6d6c189SCody Peter Mello# University of Groningen 65*e6d6c189SCody Peter Mello# The Netherlands 66*e6d6c189SCody Peter Mello# o 67*e6d6c189SCody Peter Mello# . . 68*e6d6c189SCody Peter Mello# o ^ mailto:eiso@chem.rug.nl 69*e6d6c189SCody Peter Mello# | - _ mailto:eiso@dds.nl 70*e6d6c189SCody Peter Mello# \__|__/ http://md.chem.rug.nl/~eiso 71*e6d6c189SCody Peter Mello# | tel 4326 72*e6d6c189SCody Peter Mello# | 73*e6d6c189SCody Peter Mello# / \ 74*e6d6c189SCody Peter Mello# / \ 75*e6d6c189SCody Peter Mello# | | 76*e6d6c189SCody Peter Mello# ________ ._| |_. ________________________________________________ 77*e6d6c189SCody Peter Mello# 78