From: Victor Wagner Date: Tue, 15 Oct 2013 08:20:21 +0000 (+0400) Subject: exclude already seen entries X-Git-Url: https://wagner.pp.ru/gitweb/?a=commitdiff_plain;ds=sidebyside;h=ffd58cc8b31550b446cceb260daca2e15ed01097;p=oss%2Fvjournal.git exclude already seen entries --- diff --git a/activity b/activity index ed650c2..0ba311c 100644 --- a/activity +++ b/activity @@ -1,2 +1,7 @@ #!/bin/bash -while true; do sudo netstat -tp --numeric-ports ; done |awk '/:80/&&$7!="-" {print $4,$5,$7,$8;}' > log +while true; do sudo netstat -tp --numeric-ports ; done |awk '/:80/&&$7!="-" { +if (!( ($4,$5) in a) ) { +print $4,$5,$7,$8; +a[$4,$5] = $7; +} +}' >log