This commit is contained in:
Luke Smith 2023-02-17 12:12:10 -05:00
parent ad6ecdb3fc
commit 762eadd9d1
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252

View file

@ -25,7 +25,7 @@ getdailyhighlow() {
echo "$weatherdata" | sed '13q;d' | # Extract line 13 from file echo "$weatherdata" | sed '13q;d' | # Extract line 13 from file
grep -o "m\\([-+]\\)*[0-9]\\+" | # Find temperatures in the format "m<signed number>" grep -o "m\\([-+]\\)*[0-9]\\+" | # Find temperatures in the format "m<signed number>"
sed 's/[+m]//g' | # Remove '+' and 'm' sed 's/[+m]//g' | # Remove '+' and 'm'
sort -n -k 2n | # Sort in ascending order sort -g | # Sort in ascending order
sed -e 1b -e '$!d' # Extract the first and last lines sed -e 1b -e '$!d' # Extract the first and last lines
} }