diff --git a/update-rates b/update-rates index a3e9f46..e70b892 100755 --- a/update-rates +++ b/update-rates @@ -30,7 +30,7 @@ last_date="$(tail -n1 "$pricedb" | sed 's/P \([0-9 :-]*\) .*/\1/')" printf 'Fetching all exchange rates after %s\n' "$last_date" values="$(ssh $SSHARGS "$SERVERSIDE_PATH_TO_RATES '$last_date' $SYMBOLS")" -if [ $? -eq 0 -a -n "$values" ]; then +if [ $? -eq 0 ] && [ -n "$values" ]; then printf '%s\n' "$values" >> "$pricedb" printf '%s\n' "$values" fi