blob: d73a73c83d7508b4533dfb773d55a65c6874bd18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/bin/bash
LAMPE="$1"
TOGGLE="$2"
LAMP=~s/[a-zA-Z]//g
TOGGLE=~s/[a-zA-Z]//g
STRING="\xA5\x5A\d$LAMPE\d$TOGGLE"
if [ $# != 2 ]
then
echo -ne "Usage: licht <lampe> <0/1>"
else
echo "$LAMPE$TOGGLE"
echo -ne "$STRING" | nc -u -w1 10.42.3.100 1337
fi
|