Created
December 19, 2009 21:52
-
-
Save r00tw33d/260257 to your computer and use it in GitHub Desktop.
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 | |
#Czyta dane z pliku | |
cnd=$(cat ~/weather) | |
#Ustawia czcionkę obrazkową, odpowiadającą aktualnej pogoda. | |
if echo "$cnd" | grep -E -i -q 'partly cloudy'; then | |
echo 'c' | |
elif echo "$cnd" | grep -E -i -q 'fair|sunny'; then | |
echo 'A' | |
elif echo "$cnd" | grep -E -i -q 'cloudy'; then | |
echo 'e' | |
elif echo "$cnd" | grep -E -i -q 'storm|thunder'; then | |
echo 'i' | |
elif echo "$cnd" | grep -E -i -q 'snow'; then | |
echo 'k' | |
elif echo "$cnd" | grep -E -i -q 'rain'; then | |
echo 'h' | |
elif echo "$cnd" | grep -E -i -q 'shower'; then | |
echo 'g' | |
fi |
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 "$(nc localhost 7634 | cut -d'|' -f4)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment