Skip to content

Instantly share code, notes, and snippets.

@gregorymostizky
Created January 25, 2011 13:22
Show Gist options
  • Save gregorymostizky/794901 to your computer and use it in GitHub Desktop.
Save gregorymostizky/794901 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