Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- exec 3<>/dev/tcp/krakow.hackerspace.pl/666
- echo "take guitar" >&3
- A=$(timeout 0.5 cat <&3)
- echo "$A"
- while [ 1 = 1 ]; do
- echo "|$A|"
- if [[ "$A" == *"pink cir"* ]]; then
- echo "press pink button" >&3
- elif [[ "$A" == *"yellow cir"* ]]; then
- echo "press yellow button" >&3
- elif [[ "$A" == *"red cir"* ]]; then
- echo "press red button" >&3
- elif [[ "$A" == *"blue cir"* ]]; then
- echo "press blue button" >&3
- elif [[ "$A" == *"green cir"* ]]; then
- echo "press green button" >&3
- fi
- A=$(timeout 0.3 cat <&3)
- sleep 0.1
- done
Add Comment
Please, Sign In to add comment