#! /bin/bash
read –p “A user:” MYUSER
cut –d: -f1 /etc/passwd | grep “^$MYUSER”&> /dev/null || exit 6
let COUNT=`who | grep “^$MYUSER” | wc –l`
until [ $COUNT -ge 4 ];do
sleep 5
let COUNT=`who | grep “^$MYUSER” | wc -l`
done
echo “$MYUSER loged 4 times.”