mirror of
https://github.com/techarkit/shell-scripting-tutorial.git
synced 2025-07-21 18:35:45 +00:00
Create answers.sh
Execute questions and auto answer
This commit is contained in:
15
answers.sh
Normal file
15
answers.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout -1
|
||||
|
||||
spawn ./questions.sh
|
||||
expect "Hi\r"
|
||||
send -- "Hi\r"
|
||||
|
||||
expect "How are you?\r"
|
||||
send -- "I am fine\r"
|
||||
|
||||
expect "Whats your Name?\r"
|
||||
send -- "My name is Ravi\r"
|
||||
|
||||
expect eof
|
Reference in New Issue
Block a user