Let's say I want to write a shell script that executes just one command. But this command is poorly designed. It doesn't offer any command line options; instead it asks some questions and waits for user input.Is there a way to prepare this input in the script, so the questions are answered automatically?
Prepare answers for questions of a command
shell;shell script
If the command is not very picky it should work with something like this:command > /dev/null << EOF<answer 1><answer 2><answer 3>EOFThis requires that you know the exact answers beforehand.