#! /bin/sh t=/tmp/smshelp.$$ trap "rm -f $t $t.1 $t.2" EXIT cat >$t.1 (head -qc 155 <$t.1|tr '\r\n' ' '|sed -e 's/:/\\:/g' -e 's/"/\\\\"/g';echo '"\r:') >$t tail -c +156 <$t.1 >$t.2 if [ -s "$t.2" ];then echo "-----------------------------------------------------------------------" echo "MESSAGE TOO LONG! CUT WAS AT:" cat $t.2 echo exit 1 fi (echo 'TOP_W:v1.0:ttermin:' if [ "$1" = h -o -z "$1" ];then echo -n 'tsmsend 0603431329,"';cat $t;fi if [ "$1" = l -o -z "$1" ];then echo -n 'tsmsend 0603457332,"';cat $t;fi if [ "$1" = t -o -z "$1" ];then echo -n 'tsmsend 0603223050,"';cat $t;fi echo 'tquit\r:' sleep 5 )|ssh -v gps.geoinvest.cz 'exec ./src/m1d/static/gateway -le0n/dev/null'