5

Subtract two rows (in Time format)

view full story
linux-howto

http://www.unix.com – Hello all, I have written sth like this: Code: #!/bin/bash grep -e XXX -e YYYY myfile.log | grep -v ZZZ | awk '{print $1 " " $2 ";" $3 ";" $9 ";" $11}' > myfile.csv sed -i '1iDate;Time;From;To' myfile.csv => it is clear that it converts log to csv and add a header. Now I want to subtract row B3-B2,B5-B4,... which I mean I want to subtract the times. right now this is my problem :) i hope someone can help me in a easy way! this is my first script. Thanks (HowTos)