This commit is contained in:
corwin 2026-04-21 04:24:00 -05:00
parent 8856d187ba
commit c53c1299eb
6 changed files with 159 additions and 0 deletions

8
save-count.pl Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/perl -nl
# print the name and number of records in each non-empty ipset
#(c)2026 Corwin Brust <corwin@bru.st>
# 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() }