Skip to content

Instantly share code, notes, and snippets.

@krishnan793
Created December 18, 2014 16:20
Show Gist options
  • Save krishnan793/b6c6322e77d10b95e64d to your computer and use it in GitHub Desktop.
Save krishnan793/b6c6322e77d10b95e64d to your computer and use it in GitHub Desktop.
Automating scripts using expect
#! /usr/bin/expect -f
spawn telnet 192.168.1.1
expect "Login:"
send "username\r"
expect "Password:"
send "password\r"
sleep 1
send "?\r"
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment