13

expect in bash script

view full story
linux-howto

http://www.unix.com – Hi, I'm writing a shell script that calls a few commands that prompt the user for two simple yes/no questions. if the answers are consistent (the first is a yes, the second is a no), what would my expect script look like? Google is only giving me answers for scripts where I telnet or ssh. right now I have: Code: #!user/bin/expect package require Expect spawn bash expect "...." send "yes\r" expect "...." send "yes\r" exit 0 also, do I save the file as .tcl? Thank you! (HowTos)