#!/bin/sh
echo "Distinct Users:"
last -f /var/log/wtmp.1 | cut -f 1 -d ' ' | sort | uniq -c | sort -nr | grep [0-9]' ' | wc -l
echo "10 logins:"
last -f /var/log/wtmp.1 | cut -f 1 -d ' ' | sort | uniq -c | sort -nr | grep [0-9][0-9]' ' | wc -l
echo "100 logins:"
last -f /var/log/wtmp.1 | cut -f 1 -d ' ' | sort | uniq -c | sort -nr | grep [0-9][0-9][0-9]' ' | wc -l
echo "1000 logins:"
last -f /var/log/wtmp.1 | cut -f 1 -d ' ' | sort | uniq -c | sort -nr | grep [0-9][0-9][0-9][0-9]' ' | wc -l
last -f /var/log/wtmp.1 | cut -f 1 -d ' ' | sort | uniq -c | sort -nr | grep -v wtmp.1 
