#! /bin/sh if test $# -eq 0 then echo "when-login " exit fi until who | grep $1 do sleep 3 done