]> wagner.pp.ru Git - oss/vjournal.git/commitdiff
exclude already seen entries
authorVictor Wagner <wagner@atlas-card.ru>
Tue, 15 Oct 2013 08:20:21 +0000 (12:20 +0400)
committerVictor Wagner <wagner@atlas-card.ru>
Tue, 15 Oct 2013 08:20:21 +0000 (12:20 +0400)
activity

index ed650c26fb7f389b32afc1891c7d030988b9b811..0ba311ceea29243ecec22fc5a43f888e5d3cdee8 100644 (file)
--- 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