Change the way the separation of weater_condition and temperature are made, so it can take minus 0 temperature in celcius
This commit is contained in:
parent
9d9a5d2b14
commit
06f257d482
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ display_weather()
|
|||
fi
|
||||
weather_information=$(fetch_weather_information $display_weather)
|
||||
|
||||
weather_condition=$(echo $weather_information | cut -d "+" -f 1 | cut -d "-" -f 1) # Sunny, Snow, etc
|
||||
temperature=$(echo $weather_information | cut -d '+' -f 2) # +31°C, -3°F, etc
|
||||
weather_condition=$(echo $weather_information | rev | cut -d ' ' -f2- | rev) # Sunny, Snow, etc
|
||||
temperature=$(echo $weather_information | rev | cut -d ' ' -f 1 | rev) # +31°C, -3°F, etc
|
||||
unicode=$(forecast_unicode $weather_condition)
|
||||
|
||||
echo "$unicode ${temperature/+/}" # remove the plus sign to the temperature
|
||||
|
|
Loading…
Reference in a new issue