1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 09:57:09 +00:00

fixed the regex to reflect disallowed chars in windows usernames

This commit is contained in:
jon 2011-04-02 16:50:57 +02:00 committed by Steve Schnepp
parent 64296bf208
commit fd45eb113b

View file

@ -19,6 +19,7 @@ CFG
exit 0;;
esac
tail -n+5 "$SESSIONS" | head -n-2 | awk '$2 ~ "[a-z]+" { ua[tolower($2)]; ha[$1] }
END{ print "users.value",length(ua);
print "hosts.value",length(ha) }'
tail -n+5 "$SESSIONS" | head -n-2 | awk '$2 !~ "[\[\]\(\)\:;\"<>\*\+=\|\\/\?,]" { if(length($2)>=2) ua[tolower($2)] }
$1 !~ "\:" { ha[$1] }
END{ print "users.value",length(ua);
print "hosts.value",length(ha) }' 2>/dev/null