3

script showing if a user is online and the last time online

view full story
linux-howto

http://www.unix.com – edit:i realized i have an incorrect title. I'm trying to display how long a user has been online. Sorry for any confusion I've been working on this script and it basically shows if a user is online and now I am modifying it to tell how long the user has been online. this is what I have so far Code: if [ $# -lt 1 ] then         echo "You must supply a username."         exit 1 fi if  who|grep -qw ^$1>/dev/null 2>&1 then         echo "$1 is online" else         echo &quot (HowTos)