Although Linux has many
grep
variants, you can always find a new one. I only discovered grepcidr
[1] a few months ago. As the name suggests, the tool filters input by IP addresses and networks. It works equally well with IPv4 and IPv6. To show grepcidr
's capabilities, I will use it to compile a list of all IPv4 addresses on my home network. I got this from the Syslog on the firewall, which is also the DHCP server:cd /var/log grepcidr 10.0.0.0/24 syslog|grep DHCPACK|tail -n 1500|cut -f9 -d" "|sort|uniq > 1stlistREF: http://www.linux-magazine.com/Issues/2018/216/The-sys-admin-s-daily-grind-grepcidr
沒有留言:
張貼留言