Skip to content

Instantly share code, notes, and snippets.

@r00tw33d
Created December 19, 2009 21:52
Show Gist options
  • Save r00tw33d/260257 to your computer and use it in GitHub Desktop.
Save r00tw33d/260257 to your computer and use it in GitHub Desktop.
#!/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
#!/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