#!/bin/sh
PORT=$1
echo "" | telnet 192.168.0.2 $PORT
status="$?"
[ "$status" = "0" ] && echo "$PORT is up" && exit 0
echo "$PORT is down"
exit 1

