Ron Ron - 1 year ago 79
Linux Question

How can I respond to prompts in a Linux Bash script automatically?

I am running a script (I can't edit it), and there are three yes/no questions. How can I automatically respond to these questions? I need to answer yes, yes, no (in that order).

Answer Source

Try this:

echo -e "yes\nyes\nno" | /path/to/your/script
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download