Yes
Jump to navigation
Jump to search
yes is a command that just outputs a string repeatedly. The default string is "y" if no other string is given as the command argument.
It can be useful in scripts to run interactive commands.
For example:
$ yes | rm -i /tmp
This will run the rm -i and send 'y' to all the questions (yes it's a silly example)
Provided by
Most (all?) Linux distributions incorporate this from the GNU Coreutils: man page
Tips
- Because of behavior differences, you are usually best off to decide on one of the forms and always use that form. Life is less confusing that way.
Related Commands
- echo - Print command args as text.
- printf(command) - Formatted printing for shell scripts.
This article is a stub and needs to be finished. Plunge forward and help it grow!