From: Tomas Mudrunka Date: Thu, 2 Aug 2012 16:07:39 +0000 (+0200) Subject: Fix of dates in sleepmon X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=5e47bf73f5ab0c2ced1a62249950db179eaaeef6;p=mirrors%2FPrograms.git Fix of dates in sleepmon --- 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;