Hi! I need help with this:
I want to write an AWK script, that matches computer usage of users, listed at the available log file, Users.log.
Which is how many times a user has entered, and how much time was logged in?
for example:
$ cat Users.log
user1; login, 2009-03-26, 10:30
user2; login, 2009-03-26, 11:07
user2; logoff, 2009-03-26, 12:20
user1, logoff, 2009-03-26, 12:00
user3; login, 2009-03-26, 16:53
user3; logoff, 2009-03-26, 19:54
user1; login, 2009-03-26, 20:11
user1, logoff, 2009-03-26, 21:32
$ ./userstat.awk Users.log
output:
user1: 2 times, 2 hours 51 minutes
user2: 1 time, 1 hour 13 minutes
user3: 1 time, 3 hours 1 minute