file format: count ip cat file.txt
2 11.22.33.33
10 33.33.44.55
I want to print lines which $1 > $MAX
MAX=10
cat $ip_file | awk '{counts[$1]++} END{ for (ip in counts) if ($(counts[ip]) > "'${MAX}'" ) print counts[ip] " " ip }
the scrip above does not work, please help.