News for hackers. Stuff that matters.
Re:Learn to use Awk with hundreds of examples by dredmorbius on Wednesday October 25, 2017 @10:55AM (#15550622)
If you just want to count unique IPs, you can get that in awk alone and avoid sort:

    awk '{ip[$1]=1}; END{ print length(ip) }'
Use the hash tables directly, assuming you've got the memory. That should be slightly faster as it avoids the sort.
Re:Learn to use Awk with hundreds of examples by asicsp on Wednesday October 25, 2017 @11:06AM (#15550711)
nice one

also, {ip[$1]} is enough...

Re:Learn to use Awk with hundreds of examples by dredmorbius on Wednesday October 25, 2017 @03:56PM (#15553548)
Thanks, I was trying to think of the fastest possible assignment.