Skip to content

Instantly share code, notes, and snippets.

@namgivu
Created January 9, 2020 05:36
Show Gist options
  • Save namgivu/414b71b4a4c894dcf01494f4f4c225d1 to your computer and use it in GitHub Desktop.
Save namgivu/414b71b4a4c894dcf01494f4f4c225d1 to your computer and use it in GitHub Desktop.
test psql at specific ip:port
# ref. https://stackoverflow.com/a/59657648/248616
echo 'QUIT' | nc -w SECONDS YOUR_HOST PORT; echo $?
# eg
echo 'QUIT' | nc -w 1 localhost 5432; echo $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment