There is a
yes command in unix/linux which basically infinitely prints
y to the
stdout. What is the point of it, and how is it useful?
via wikipedia: http://en.wikipedia.org/wiki/Yes_(Unix)
This might be a controversial opinion, but in my view it is an ugly fix for bad user interface in command-line tools.
Some command-line tools ask questions to the user with a prompt and do not have an option to run non-interactively; imagine for instance something such as
Since the answer to the question is taken from standard input, a quick fix to this problem is having an application that outputs the string
One of the issues with this approach is that
A better solution, when it is available, is a specific option to run non-interactively, such as
The yes command is used to output "y", or whatever word you choose, forever.
As an example, the following:
Is functionally equivalent to