-
-
Save gfranchini/53e64b4d6f58d8647d0d9ba9da8627b1 to your computer and use it in GitHub Desktop.
Check if redis is up using telnet and expect
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
set timeout 5 | |
spawn telnet [lindex $argv 0] [lindex $argv 1] | |
expect "Connected" | |
send "PING\n" | |
expect "+PONG" | |
send "QUIT" | |
#usage: expect redis.expect <host> <port> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment