From 42eb493ff9af68b635d02340f69cfb5e260faa1c Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 30 Sep 2014 23:47:26 +0200 Subject: [PATCH] BTC fixes --- Utils/BTC_stats.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utils/BTC_stats.sh b/Utils/BTC_stats.sh index 03ede08..7a44179 100755 --- a/Utils/BTC_stats.sh +++ b/Utils/BTC_stats.sh @@ -8,7 +8,7 @@ function update_file { #echo WILL_WGET } -if [ -e $file ]; then +if [ -s $file ]; then #update if older than 1h age=`stat -c %Y $file`; now=`date +%s`; @@ -20,7 +20,7 @@ if [ -e $file ]; then #Fucking ugly, but works content=`cat $file | python -mjson.tool | grep -A3 EUR | tail -n3 | cut -d':' -f2 | cut -d'"' -f2`; - p24h=`echo "$content" | sed -n 1p` + p24h=`echo "$content" | sed -n 1p | cut -d. -f1` p7d=`echo "$content" | sed -n 3p` p30d=`echo "$content" | sed -n 2p`