On Thursday 20 of December 2012 08:44:36 Rudolf Sykora wrote:
> Hello,
> 
> awk doesn't have arrays with array members, which is what I now need.


how about using two-level array?

BEGIN {
        a["foo",1] = "abc"
        a["foo",2] = "pqr"
        a["foo",3] = "xyz"
        a["bar",1] = "B1"
        a["bar", 2] = "B2"
        a["bar", 3] = "B3"
        for (i in a)
                if (i ~ "foo")
                        print a[i]
}



hope that helps,
-- 
dexen deVries

[[[↓][→]]]


Reality is just a convenient measure of complexity.
                -- Alvy Ray Smith

Reply via email to