From 8f93b40c0ee78070fef8e56bcf5c684b53d8eb21 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Thu, 6 Jan 2011 15:37:57 +0100 Subject: [PATCH] formatting, added header --- tls_stats.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tls_stats.sh b/tls_stats.sh index d7dd5ac..8be50fb 100755 --- a/tls_stats.sh +++ b/tls_stats.sh @@ -6,4 +6,6 @@ # and cipher used. MIN_MAILS=2 -zgrep 'Anonymous TLS connection established from' /var/log/mail.log* | sed -r 's/\[[0-9.]*\]://g' | awk {'print $15,$11'} | sort | uniq -c -i | while read line; do [[ $(grep -oE '^\s*[0-9]+' <<< $line) -gt $MIN_MAILS ]] && echo $line; done +echo -e "Count\tCipher used\tSending domain" +echo "--------------------------------------" +zgrep 'Anonymous TLS connection established from' /var/log/mail.log* | sed -r 's/\[[0-9.]*\]://g' | awk {'print $15,$11'} | sort | uniq -c -i | while read line; do [[ $(grep -oE '^\s*[0-9]+' <<< $line) -gt $MIN_MAILS ]] && echo $line | tr -s ' ' '\t'; done