ansiweather

Weather in terminal, with ANSI colors and Unicode symbols
Log | Files | Refs | README | LICENSE

commit 8176cb3887d30000ce63e82687a5b15666e052fd
parent d80b63afc5d8f9475eae8cbef5e7752d5ec8b2a6
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Thu, 30 Jul 2015 23:15:28 +0200

Using printf instead of echo, adding newlines to the output string + escaping percent sign

Diffstat:
Mansiweather | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/ansiweather b/ansiweather @@ -365,21 +365,23 @@ then i=$(($i + 1)) done - output="$output\033[0m" - echo -e "$output" + + output="$output\033[0m\n" + + printf "$output" else if [ $symbols = true ] then icon="$(get_icon $sky)" fi - output="$background$text $greeting_text $city $delimiter$data $temperature $scale $icon$dashes$text $wind_text $delimiter$data $wind $speed_unit $direction $dashes$text $humidity_text $delimiter$data $humidity % $dashes$text $pressure_text $delimiter$data $pressure $pressure_unit" + output="$background$text $greeting_text $city $delimiter$data $temperature $scale $icon$dashes$text $wind_text $delimiter$data $wind $speed_unit $direction $dashes$text $humidity_text $delimiter$data $humidity %% $dashes$text $pressure_text $delimiter$data $pressure $pressure_unit" if [ $daylight = true ] then output="$output $dashes$text $sunrise_text $delimiter$data $sunrise_time $dashes$text $sunset_text $delimiter$data $sunset_time" fi - output="$output \033[0m" + output="$output \033[0m\n" - echo -e "$output" + printf "$output" fi