[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FW: SPLIT function changed?
From: |
Darrel Hankerson |
Subject: |
Re: FW: SPLIT function changed? |
Date: |
Fri, 27 Apr 2001 11:04:21 -0500 |
Bill Brown" <address@hidden> writes:
Seems like I use the SPLIT function in several AWK files and they're all
broke. Help????
Read the section of the gawk manual on "scanning all elements of an
array". Your point is apparently that
for (i in ff) print i, ff[i]
does not necessary have the "preferred" order. This is documented in
the section mentioned above. This doesn't have much to do with split().
A work around seems to be
j=1
while (j in ff) { j++ }
for (i=1; i<j; i++) print i, ff[i]
Any explanations?
?? Why not just
for (i=1; i<N; i++) print i, ff[i]
where N is the count from the split?
--Darrel Hankerson address@hidden