Large IP list handling
Some handy one liners for IP list parsing
Group IP list into /24s (CIDR)
cat IPs_list.txt | sort -u | awk 'BEGIN { FS = "." } ; { printf("%s.%s.%s/24\n", $1, $2, $3) }' | sort | uniq -c | sort -rn cat IP_list.txt | awk 'BEGIN { FS = "." } ; { printf("%s.%s.%s/24\n", $1, $2, $3) }' | sort | uniq -c | sort -rnBasic count of IPs
cat IP_list.txt | sort | uniq -c | sort -rnLast updated
Was this helpful?