#/bin/bash # HOST=`pdns-get $1` if [[ $? -eq 0 ]]; then socat stdio tcp:$HOST:22 else >&2 echo CONNECTION ERROR: IP of host $1 is unknown. fi