#!/usr/bin/perl -nl # print the name and number of records in each non-empty ipset #(c)2026 Corwin Brust # You may use this program under the terms of the GNU Public License version three (3) or, at your option, any later version of that license. (GPLv3+) sub p{ print qq($n $c) if $n and $c } if ( /^create (\S+)/ ) { p(); $c=0; $n=$1 } else { ++$c if $n and /^add/ } END{ p() }