What would be the proper way to change the "2" limit to use a variable? I have a file of IP addresses that I want to report only the addresses with a count over the max variable.
awk '{a[$0]++}END{for(i in a){if(a[i] > **2**){print i}}}' a.txt
Attempt 1:
max=5
awk '{a[$0]++}END{for(i in a){if(a[i] > max){print i}}}' a.txt
Attempt 2:
$max, max {max}
Thanks
Question is based on this link: