Have bash script answer interactive prompts [duplicate]

A simple

echo "Y Y N N Y N Y Y N" | ./your_script

This allow you to pass any sequence of “Y” or “N” to your script.

Leave a Comment