mirror of
https://github.com/techarkit/shell-scripting-tutorial.git
synced 2025-07-25 01:28:51 +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