Ubuntu Pastebin

Paste from e at Wed, 9 Mar 2016 12:40:29 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/bash
awk '
 /MSG\[BEGIN JOB/ { 
    split ($1, d1, /[-]/);
    split ($2, t1, /:/);
}
 /MSG\[END JOB/ {
    
split ($1, d2, /[-]/);
    split ($2, t2, /:/);
    end   = mktime (d2[3]" "d2[2]" "d2[1]" "t2[1]" "t2[2]" "t2[3])
    start = mktime (d1[3]" "d1[2]" "d1[1]" "t1[1]" "t1[2]" "t1[3])
    print end - start
}' bla
Download as text