Port scanning

timeout 1 bash -c "</dev/tcp/<IP>/<PORT>" && echo Port open. || echo Port closed