check status of port
OK. At least partially stolen from commandlinefu. Added some polish to it.
#!/bin/sh
printf "Port ${1:-80} on ${2:-127.0.0.1} is "
(: </dev/tcp/${2:-127.0.0.1}/${1:-80}) &>/dev/null \
&& echo"OPEN" || echo "CLOSED"
Watch the wrap.
Written by Ruurd Pels
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Open
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#