Some commands - like
rm -i
,
find -ok
, and so on - ask users to
answer a "do it or not?" question from the keyboard.
For example, you might use a file-deleting program named
del
that
asks before deleting each file:

%
del *
Remove file1?
y
Remove file2?
y
...

If you answer
y
, then the file will be deleted.

What if you want to run a command that's going to ask you 200 questions
and you want to answer
y
to all of them, but you don't want to type
all those
y
's in from the keyboard?
Pipe the output of
yes
to the command; it will answer
y
for you: