From 0a49508c68e83344ba58a6dd8f76b75677dee40e Mon Sep 17 00:00:00 2001 From: Momo Date: Thu, 25 Aug 2011 20:26:13 +0200 Subject: initial vommit --- licht/licht.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 licht/licht.sh diff --git a/licht/licht.sh b/licht/licht.sh new file mode 100644 index 00000000..d73a73c8 --- /dev/null +++ b/licht/licht.sh @@ -0,0 +1,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 <0/1>" +else + echo "$LAMPE$TOGGLE" + echo -ne "$STRING" | nc -u -w1 10.42.3.100 1337 +fi -- cgit v1.2.3