From ffd58cc8b31550b446cceb260daca2e15ed01097 Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Tue, 15 Oct 2013 12:20:21 +0400 Subject: [PATCH] exclude already seen entries --- activity | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.5