I am sick and tired of my kids fighting over who has been on the
computer most and when.  I wrote a howlong program that shows a
filtered output that looks like:

printf '%-8s %s %s %s %s\n' $(last -R | grep -E 'tty[[:digit:]]+' |
grep "$(date +'%a %b %e')" | tr -s ' ' | cut -d ' ' -f1,6-)

which dumps out something like:

deedee        Sun Jan 26 15:19 - 16:05  (00:45)
james         Sun Jan 26 12:52 - 15:19  (02:27)
deedee        Sun Jan 26 10:46 - 12:51  (02:04)
patrick       Sun Jan 26 07:48 - 10:46  (02:57)
patrick       Sun Jan 26 07:39 - crash  (00:07)

Before I start hacking on this, which will be admittedly rather
simple, does anyone know of a utility that will do this? And include
some other processing, like totals and percentages?
-- 
Alan Young

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to