Created
April 6, 2011 10:53
-
-
Save chmouel/905467 to your computer and use it in GitHub Desktop.
Quickly Test if a port is open.. and
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c 'import socket;s = socket.socket(socket.AF_INET, socket.SOCK_STREAM); s.connect(("localhost", 2022))' >/dev/null 2>/dev/null || blah_launch_server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nc -z -v -w5 localhost 2022
would do as well if you have netcast installed