The following will grab you an integer of the number of hours an active user has logged into a computer: user=$( ls -l /dev/console | awk '{ print $3 }' ) ; ac users $user | awk '{ print $2 }'
The following will grab you an integer of the number of hours an active user has logged into a computer: user=$( ls -l /dev/console | awk '{ print $3 }' ) ; ac users $user | awk '{ print $2 }'