time calculation with awk

Posted by vbd on Stack Overflow See other posts from Stack Overflow or by vbd
Published on 2010-04-20T11:09:04Z Indexed on 2010/04/20 11:13 UTC
Read the original article Hit count: 234

Filed under:
|

I've got a file, which looks like:

Coding       |2010-04-20 12:52|2010-04-20 14:11
Documentation|2010-04-20 22:56|2010-04-21 01:13
Coding       |2010-04-21 09:51|2010-04-21 10:58
Coding       |2010-04-21 13:11|2010-04-21 14:21

What's the best way - I'm thinking of awk - to do time calculations. As result I expect:

2010-04-20 Coding         69
2010-04-21 Documentation 137
2010-04-21 Coding        137 

Can this be done with awk?

© Stack Overflow or respective owner

Related posts about awk

Related posts about time