Last active
November 7, 2017 15:38
-
-
Save camaleaun/05fc3853ae57ed073a5c9eec4ceb9ff8 to your computer and use it in GitHub Desktop.
Get temperatures from company of water service in São Bento do Sul SC - Brazil
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'Temperatures in São Bento do Sul SC - Brazil' | |
CURL=$(curl -s http://www.samaesbs.sc.gov.br/) | |
NOW=$(echo $CURL | grep -oP 'temperatura\">\K([\d.]+)') | |
HIGH=$(echo $CURL | grep -oP '_max\">\K([\d.]+)') | |
LOW=$(echo $CURL | grep -oP '_min\">\K([\d.]+)') | |
echo " Now $NOWºC" | |
echo "High $HIGHºC" | |
echo " Low $LOWºC" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment