At times, you are just too tired of typing echo hello | nc -l
...here
is the script to be used by other programs
This script, port_establish.sh
, returns 1
if it cannot establish
a connection to remotehost on a given port. I saw...who knows?
On remote host machine mickey
$ TIMEOUT=60 PORT_NUMBER=4242 ./port_listen.sh
# or just
$ nc -l 4242
On a host machine minnie
$ MSG="Pluto is comming" PORT_NUMBER=4242 REMOTE_HOST=mickey ./port_establish.sh
The counterpart of this is port_listen
.
author: tuan t. pham