- What is the use of yes command?
- How do you answer yes in command prompt?
- How do you write yes in a shell script?
What is the use of yes command?
The yes command outputs an affirmative response repetitively. Use the yes command as piped input to another command that requires an affirmative response before it completes the specified action. For example, the yes command is useful when deleting multiple files from a directory.
How do you answer yes in command prompt?
If you type “yes” by itself at the command prompt, your screen is going to start filling up with the just the letter “y” (one per line) until you hit control-C to stop it.
How do you write yes in a shell script?
echo y | command should work.