How do I check if a port is open from a shell script
Sometime I find myself needing to check if a port is open, on a system or container, that doesn't have the usual programs such as, nc or netstat.
Luckily, bash have a built in way of checking if a port is open:
</dev/tcp/localhost/31339 && echo 'Port open.' || echo 'Port closed.'