Exactly what purpose does this command serve ?
/usr/bin/yes
kreaper@testbox % file /usr/bin/yes
/usr/bin/yes: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped
kreaper@testbox % /usr/bin/yes
y
y
y
y
y
y
^C
yikes!
kreaper@testbox % /usr/bin/yes "foobar"
foobar
foobar
foobar
foobar
foobar
foobar
foobar
foobar
foobar
foobar
foobar
foobar
foobar
foobar
foobar
^C
And yes, they’ve even got a MAN page for this crap.
kreaper@testbox % man yes
NAME
yes - output a string repeatedly until killed
SYNOPSIS
yes [STRING]...
yes OPTION
DESCRIPTION
Repeatedly output a line with all specified STRING(s), or `y'.
--help display this help and exit
--version
output version information and exit
AUTHOR
Written by David MacKenzie.
REPORTING BUGS
Report bugs to
COPYRIGHT
Copyright © 2005 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of the GNU General Public License
SEE ALSO
The full documentation for yes is maintained as a Texinfo manual. If the info and yes programs are properly installed at
your site, the command
info yes
should give you access to the complete manual.
yes 5.93 April 2006 YES(1)

anything that requires a repetitive entry of ‘y’, for example. I highly recommend trying the following:
% yes | /bin/rm -i *
:-)
so that’s one additional command and a wasted pipe to achieve what a command should natively be programmed to do. not sold yet, BB ! :)
Thanks for the tip! this is going to dramatically cut down on the amount of code I have in my scripts. Great find…
% ssh $hosts “/usr/bin/yes | /usr/sbin/pkgadd ”
Saying “y” to every question pkgadd might ask so you can do something useful while it installs software on $hosts.
Hint: first comment contained brackets so the “hosts” is missing