An Automated Yes Man

16 February 2014

There’s an interesting Unix command called the yes command.

yes - output a string repeatedly until killed

Without arguments it repeatedly prints ‘y’. Guess what yes no yes outputs.

Yes is designed for automated input to prompts from interactive scripts, e.g.

yes | rm -i foo

So you don’t have to pull off a Homer.

It can also be used for simple load testing since it has high CPU usage.

Yes is part of GNU coreutils and is still being maintained.

To find out more about this yes man, run man yes.
You can also check out the source code or read a technical report by MIT.

This content is open source.
Please help improve it.