SyntaxFix
Write A Post
Hire A Developer
Questions
You can also use printf to pipe the input to your script.
var=val printf "yes\nno\nmaybe\n$var\n" | ./your_script.sh