Filter IP addresses matching IPv4/IPv6 CIDR specificationhttp://www.pc-tools.net/unix/grepcidr/
grepcidr can be used as a stream filter when you need to compare a list of IP
addresses against one or more Classless Inter-Domain Routing (CIDR) mask
specifications. Think of grepcidr as a CIDR-aware grep; instead of using
'grep 220.127.116.11' you can use 'grepcidr -e 18.104.22.168/30', for example. Multiple
specifications, of arbitrary mask lengths, can be specified both on the
command line or loaded from a file.