is a common *n?x
program that prints out a string over and over until something kills it. The default
(if no string is given) is "y
"; just line after line of y
s, repeated infinitely.
Why, you ask?
This is actually one of the neatest things about the way UNIXlike systems work, believe it or not-- this program does have a use! Remember the pipe? That thing that lets you cause the output of one program to be the input of another until one terminates?
Well, sometimes you'll come a cross a program, for example rm -r, that will be asking you a very very large number of yes or no questions, and will expect you to type "y" or "n" into every single one of those questions. But if you know that all the answers will be "y", you can just type yes | rm -r at the command line, and it will feed "yes" into each one of rm's questions! Inane, but elegant.
See also Kosh