summaryrefslogtreecommitdiffstats
path: root/.scripts/i3weather
diff options
context:
space:
mode:
authorslump64 <slump64god@gmail.com>2018-07-05 10:41:41 +0300
committerGitHub <noreply@github.com>2018-07-05 10:41:41 +0300
commit5919c8cf595e6b66cb997fb25a21981e5d343d4e (patch)
tree044507f69f58ff6558c39ca4e194afc96d7750cd /.scripts/i3weather
parent4d28ba01df0a579b0b26af5058e144d02ece5e94 (diff)
downloadeibhear-5919c8cf595e6b66cb997fb25a21981e5d343d4e.tar.gz
eibhear-5919c8cf595e6b66cb997fb25a21981e5d343d4e.tar.zst
eibhear-5919c8cf595e6b66cb997fb25a21981e5d343d4e.zip
This one i've learned in vietnam war
Diffstat (limited to '.scripts/i3weather')
-rwxr-xr-x.scripts/i3weather4
1 files 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 "°"}'