From 9180a03af9cf570ef38530b6817a40cc96962a26 Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Sun, 3 Mar 2024 15:39:19 +0200 Subject: [PATCH] Doing simple replacement to swap , and . for Finnish format --- common/weather | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/weather b/common/weather index f98f173..d6e0a40 100755 --- a/common/weather +++ b/common/weather @@ -25,4 +25,11 @@ if [[ $DATA == *"null"* ]]; then exit fi -printf "${DESC:1:-1}, ${DATA[0]}°C (fl ${DATA[1]}°C)\n" +r () { + echo $1 | sed 's/\./\,/' +} + +w="$(r ${DATA[0]})" +fl="$(r ${DATA[1]})" + +printf "${DESC:1:-1}, $w°C (fl $fl°C)\n"