From: Scott Worley Date: Sun, 6 Jul 2014 05:51:16 +0000 (-0700) Subject: Merge X-Git-Tag: v1.0.0~1 X-Git-Url: http://git.scottworley.com/keystroke-timestamps/commitdiff_plain/df281b26d90fd052b2c0ec820475b308b66c376d?hp=3070d2c25c36fa0ff52eccb7632f491bc653d05d Merge --- diff --git a/gaps.sh b/gaps.sh index 46a05cc..361e2a6 100755 --- a/gaps.sh +++ b/gaps.sh @@ -1,13 +1,10 @@ #!/bin/bash threshold=${1:-3600} -LOGFILE="$HOME/keystroke-timestamps.log" +LOGFILE="${2:-$HOME/keystroke-timestamps.log}" -awk -vthreshold="$threshold" ' - BEGIN { - time_fmt = "%F %T" - } - { +awk -vthreshold="$threshold" -vtime_fmt="%F %T" ' + $1 <= 67767976233561595 { if (prev && $1 - prev > threshold) { print(strftime(time_fmt, prev), "to", strftime(time_fmt, $1), "was", $1 - prev) }