From 5e47bf73f5ab0c2ced1a62249950db179eaaeef6 Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Thu, 2 Aug 2012 18:07:39 +0200 Subject: [PATCH] Fix of dates in sleepmon --- c/goertzel/sleepmon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/goertzel/sleepmon.sh b/c/goertzel/sleepmon.sh index 42bbcad..a5d9d81 100755 --- a/c/goertzel/sleepmon.sh +++ b/c/goertzel/sleepmon.sh @@ -13,7 +13,7 @@ # Enjoy your data -out=/tmp/sleeplog-"$(date +%F_%r)".txt +out=/tmp/sleeplog-"$(date +%F_%T)".txt speaker-test -t sine &>/dev/null & tresh=10 lastdate=0 @@ -26,7 +26,7 @@ arecord | ./goertzel -n -q -l -t $tresh -d 4 | while read line; do date="$(date +%s)" time="$(echo "$line" | cut -f 1)" level="$(echo "$line" | cut -f 2)" - echo -ne "$time\t$date\t$(date '+%F%t%r')\t" + echo -ne "$time\t$date\t$(date '+%F%t%T')\t" test "$level" -gt "$tresh" && { echo -n "Nothing detected..."; $screen && xset dpms force off || true; -- 2.30.2