Results 1 to 4 of 4
Hi folks,
hope this is the right place to ask this:
What is the command "yes" for? All it does is repeatedly putting out the letter "y" or any specified ...
- 03-21-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 1
When and why to use the "yes" command
Hi folks,
hope this is the right place to ask this:
What is the command "yes" for? All it does is repeatedly putting out the letter "y" or any specified string until killed (CTRL-C)... but why the hell would I need this??
Any ideas? I mean there must be a use for it or it wouldn't be in every linux distribution...
Thanks in advance!
Benni
- 03-21-2010 #2
I actually found a use for it
Linux yes Command- To print repeated strings, cmd Example
Check out the examples at the bottom of the linkMake mine Arch Linux
- 03-22-2010 #3
Indeed. "yes" was created to allow automation of tasks that request confirmation. If you have a program that wants you to tell it "y" before it does something, you can now automate that program by piping yes into it.
Nowadays, Best Practices (TM) tend to include a promptless option for most interactive commands in order to allow easy automation. Because of this, it's fairly rare to see yes used now.DISTRO=Arch
Registered Linux User #388732
- 03-22-2010 #4


Reply With Quote