Created
December 18, 2014 16:20
-
-
Save krishnan793/b6c6322e77d10b95e64d to your computer and use it in GitHub Desktop.
Automating scripts using 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
#! /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