#!/bin/bash nc -z -v -w14 $1 $2 >/dev/null 2>&1 res=$? if [ "$res" != 0 ]; then echo "0" else echo "1" fi