allow definition of port to connect to
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
for i in `echo "f" "$@"|nc localhost 8888|cut -d ' ' -f '1-2'|sed -e 's# #:#'`; do
|
port=8888
|
||||||
ret=`echo "r -c" ${i%%:*} ${i##*:}|nc localhost 8888|head -n 1`
|
if [ "x$1" = "x-p" ]; then
|
||||||
|
shift
|
||||||
|
port=$1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
for i in `echo "f" "$@"|nc localhost $port|cut -d ' ' -f '1-2'|sed -e 's# #:#'`; do
|
||||||
|
ret=`echo "r -c" ${i%%:*} ${i##*:}|nc localhost $port|head -n 1`
|
||||||
echo ${i%%:*} ${i##*:} "=" $ret
|
echo ${i%%:*} ${i##*:} "=" $ret
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user