diff --git a/dumpclients b/dumpclients index dbdff1f..b4fff31 100755 --- a/dumpclients +++ b/dumpclients @@ -40,9 +40,9 @@ function print_conn() { function print_host() { local -a hosts if [ -n "$*" ]; then - while read ip state; do + while read count ip state; do resolv_hosts hosts "$ip" - echo "${hosts:-$ip}" "$state" + echo "$count" "${hosts:-$ip}" "$state" done else cat @@ -67,6 +67,6 @@ LANG=C netstat -tn ${all:+-a} | filter_proto "$proto" | filter_port "$port" | print_conn | -csort -u | -print_host $resolve | -"$scriptdir/umatch" -c -F "" +csort | +"$scriptdir/umatch" -c -F "" | +print_host $resolve