updated log_timestamp_large_intervals.sh

pull/16/head
Hari Sekhon 4 months ago
parent 23d9d25f6f
commit 8987b95f45

@ -53,7 +53,10 @@ current_epoch=0
last_line=""
while read -r line; do
timestamp="${line:0:19}" # must match the 'format' prefix above
# XXX: adjust this for other timestamp formats / lengths
timestamp="${line:0:19}" # must match the timestamp prefix length
#timestamp="$(awk '{print $1}' <<< "$line")" # needlessly expensive on forks and awk
#timestamp="${line%%[[:space:]]*}" # cheaper, take only the first token, but timestamps can have no spaces in them in place of the T separator
current_epoch="$(date -d "$timestamp" +"%s")"
if [[ "$last_epoch" -eq 0 ]]; then

Loading…
Cancel
Save