I want print only any result when $9 is greather than one hour
how can i convert this to seconds?
so i can use 3600sec for the check.
$9 = duration of a call 00:00:00
asterisk -rx "core show channels verbose" | awk '$9 > "01:00:00"' | awk '$6 == "Dial"' | wc -l > test.txt
As someone mentioned, the easiest thing is to check if the first two digits of the time are not "00". Like this:
That means that it will match and record "01:00:00" which may not be what you want :-( . It matches "$9 greater than or equal to one hour".
This would match your "greater than" condition: