From 5919c8cf595e6b66cb997fb25a21981e5d343d4e Mon Sep 17 00:00:00 2001 From: slump64 Date: Thu, 5 Jul 2018 10:41:41 +0300 Subject: [PATCH] This one i've learned in vietnam war --- .scripts/i3weather | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.scripts/i3weather b/.scripts/i3weather index cf135be..b9323c2 100755 --- a/.scripts/i3weather +++ b/.scripts/i3weather @@ -12,6 +12,6 @@ if [[ "$location" != "" ]] fi curl -s wttr.in/$location > ~/.weatherreport -echo -n $(cat ~/.weatherreport | sed -n 16p | sed -e 's/[^m]*m//g' | grep -o "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g") +echo -n $(cat ~/.weatherreport | sed '16q;d' | sed -e 's/[^m]*m//g' | grep -o "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g") -cat ~/.weatherreport | sed -n 13p | sed -e 's/[^m]*m//g;s/[^0-9]/ /g;s/ /\n/g;/^s*$/d' | grep [0-9] | sort -n | sed -e 1b -e '$!d' | tr '\n' ' ' | awk '{print " ❄️",$1 "°","☀️",$2 "°"}' +cat ~/.weatherreport | sed '13q;d' | sed -e 's/[^m]*m//g;s/[^0-9]/ /g;s/ /\n/g;/^s*$/d' | grep [0-9] | sort -n | sed -e 1b -e '$!d' | tr '\n' ' ' | awk '{print " ❄️",$1 "°","☀️",$2 "°"}'