#!/usr/bin/perl -nl # print the name and total number of records in each unique 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+) # # Input is expected on stdin as NAME COUNT and may contain duplicates NAMES # END { print qq($_ $h{$_} ) for sort keys %h } $h{$1} += $2 if /^(\S+) (\d+)$/