Subject: Re: "yes" curiousity
To: Michael G. Schabert <mikeride@prez.org>
From: Frederick Bruckman <fb@enteract.com>
List: port-alpha
Date: 06/23/1999 02:17:41
On Tue, 22 Jun 1999, Michael G. Schabert wrote:

> >It's for scripting commands that insist on prompting the user. e.g.
> >
> >yes | rm -iR ~/ 2>&1 /dev/null
> >
> >!!
> 
> Umm, why would you use iR with yes, when you can just use R?
> 
> Similarly, with the fsck thing...first you're using the command & forcing
> it to ask...but then you're going on to force it to not wait for an answer.
> Seems oxymoronic to me :)

The example is contrived. There may not be any commands in netbsd that
really need it. Some nameless, popular, inferior, OS's tend to second
guess the user at ever turn ( "are you sure...?"), so installer scripts on
dos CDs tend to have a lot of files called "y" and "yy" containing just a
single letter or two, without which the script breaks!

> So if it's piped through another command, will it automatically shut up
> when that command's through asking? In using yes with no pipes, it just
> scrolled the hell outta my telnet session.
> Bikers don't *DO* taglines.

Of course, "yes" is killed when the pipe closes. Your problem is that your
computer's too fast. Try it on a mac68k. :)