1

How do associative arrays work?

view story
linux-howto

http://unix.stackexchange.com – bash-3.00# cat iplogs.txt 180607 093423 123.12.23.122 133 180607 121234 125.25.45.221 153 190607 084849 202.178.23.4 44 190607 084859 164.78.22.64 12 200607 012312 202.188.3.2 13 210607 084849 202.178.23.4 34 210607 121435 202.178.23.4 32 210607 132423 202.188.3.2 167 bash-3.00# awk '{ip[$3]++;} END{for (var in ip)\ print var, "access", ip[var]," times"}' iplogs.txt 202.188.3.2 access 2 times 164.78.22.64 access 1 times 202.178.23.4 access 3 times 125.25.45.221 access 1 times 123.12.23.122 access 1 time The above output is unclear to me. How is $3 is inc (HowTos)