determine the periodfor which user is workin

write a shell script that determines the period for which a specified user is workin on the system.

User tty login@ idle JCPU PCPU what
root console 25Sep0810days 42 /usr/dt/bin/dtexec -open 0 -ttpr
root pts/8 25Sep0810days telnet xxxxxxxx
root pts/9 25Sep0810days telnet xxxxxx

# w -h root | awk '{print $1,"\t",$3}'
root 25Sep0810days
root 25Sep0810days
root 25Sep0810days
Does this help?

# w -h root | awk '{print $1,"\t",$3}'
root 25Sep0810days
root 25Sep0810days
root 25Sep0810days
does this work

No homework questions here, read the rules.

Thread closed!