All Linux programs read their "terminal input" from STDIN
and send their "normal output" to STDOUT
and their "error-message or status output" to STDERR
All three of these names are "standard file-handles" which all
You can therefore "stuff" any program with a set of responses by "piping" input into them, or by using the shell to "redirect" their STDIN from some other source.
Look up the bash-shell operators "|"
it is a vertical-bar); and "<", ">",
(which allow you to redirect the input and output and error streams).
I am "redirecting"
your question because there is a lot
of existing material out there which explains the concept very much better than I can.