Skip to content

Instantly share code, notes, and snippets.

@gfranchini
Forked from gregorymostizky/redis.expect
Created May 24, 2017 09:57
Show Gist options
  • Save gfranchini/53e64b4d6f58d8647d0d9ba9da8627b1 to your computer and use it in GitHub Desktop.
Save gfranchini/53e64b4d6f58d8647d0d9ba9da8627b1 to your computer and use it in GitHub Desktop.
Check if redis is up using telnet and expect
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