I think I cut out the creation of the empty file "CON". It seems curl clses the file if it is too large after the pipe is done reading it or ssomthing. Anyway, this should take care of it.

This commit is contained in:
Storm Dragon 2018-07-03 23:02:44 -04:00
parent d3e5d6f973
commit 1bbe334782

View File

@ -360,9 +360,9 @@ if [ "$speakTime" == "true" ] ; then
#Add temperature if zipcode is set #Add temperature if zipcode is set
if [ -n "$zipcode" ] ; then if [ -n "$zipcode" ] ; then
if [ "$torify" == "true" ] ; then if [ "$torify" == "true" ] ; then
temperature="$(torify curl -s "http://wttr.in/$zipcode?T" | grep -m 1 -Eo -e '-?[[:digit:]].*[CF]' | cut -d ' ' -f1 | sed 's/.*-//')" temperature="$(torify curl -s "http://wttr.in/$zipcode?T0" | grep -m 1 -Eo -e '-?[[:digit:]].*[CF]' | cut -d ' ' -f1 | sed 's/.*-//')"
else else
temperature="$(curl -s "http://wttr.in/$zipcode?T" | grep -m 1 -Eo -e '-?[[:digit:]].*[CF]' | cut -d ' ' -f1 | sed 's/.*-//')" temperature="$(curl -s "http://wttr.in/$zipcode?T0" | grep -m 1 -Eo -e '-?[[:digit:]].*[CF]' | cut -d ' ' -f1 | sed 's/.*-//')"
fi fi
if [ -n "$temperature" ] ; then if [ -n "$temperature" ] ; then
if [ "$format" = "24" ]; then if [ "$format" = "24" ]; then