Created
December 12, 2016 16:17
-
-
Save cggaurav/c60d9cf8c6a4a8a39ee918eebb946a3e to your computer and use it in GitHub Desktop.
Writing 'expect' scripts for CLI
This file contains 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 | |
set timeout 300 | |
set MODULUS ../bin/modulus | |
set USERNAME brandon@modulus.io | |
set PASSWORD qwerty | |
spawn $MODULUS login | |
expect { | |
"email:" {send "$USERNAME\r"} | |
} | |
expect { | |
"password:" {send "$PASSWORD\r"} | |
} | |
expect { | |
"brandon@modulus.io" {send "\r"} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment