How to answer ‘Yes’ for every question, automatically
If you are tired of pressing ‘y’ over and over again for a program in which your answer is always ‘y’, you can use the ‘Yes’ command to automate the process.
Here’s the syntax:
yes | <command which needs your answer many times> The above command will always provide ‘y’ as the answer. If you want to say ‘No’, use the following:
yes n | <command which needs your answer many times>