X-Git-Url: http://git.scottworley.com/keystroke-timestamps/blobdiff_plain/922ce0bc5c364f1eb9d824b9c221d899812a52ef..db435adf1d9c7aef810e55ca5fd11c52c9b9fb0f:/gaps.sh 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) }