[rbldnsd] Removing dups

furio ercolessi rbldnsd@corpit.ru
Wed, 2 Apr 2003 12:57:00 +0200


Hi all,

I just subscribed, lurked into the archive and saw that the issue
of duplicates has been discussed.

This is how we handle it:

... | sort -n -t. -k 1,1 -k 2,2 -k 3,3 -k 4,4 | aggregate -i prefix | ...

For instance feeding

127.0.0.5
127.0.0.35/32
127.0.0.0/28
127.0.0.8/30
127.0.0.18

produces

127.0.0.0/28
127.0.0.18/32
127.0.0.35/32

"aggregate" is at http://www.vergenet.net/linux/aggregate/

Hope it helps

furio ercolessi
Spin