Skip to main content

Questions tagged [yes]

For the questions about `yes` command which outputs a string repeatedly until killed

29 votes
2 answers
6k views

"Yes, and..." is a wonderful rule-of-thumb in improvisational comedy. Not so much in the UNIX world. When I run the admittedly silly yes& command, I cannot interrupt it. The terminal ...
Sebastian Carlos's user avatar
3 votes
1 answer
900 views

Scenario: I'm running a bunch of commands, some of which prompt for "yes/no" answers. I accidentally type yes as a command instead of as a response to a prompt. OOPS. Now my shell looks ...
Indigenuity's user avatar
0 votes
0 answers
209 views

Hi I have written this program with inquirer.js it has a list question and after that a text input. I want to answer both questions with piping. If I just keep the list question, I can easily use yes ...
Steve Moretz's user avatar
18 votes
1 answer
8k views

Let's say I have a makefile with a recipe called hour_long_recipe, which as its name suggests takes an hour to run. At random points throughout the recipe it asks yes/no questions. Let's say it asks ...
NeatNit's user avatar
  • 291
0 votes
1 answer
895 views

If the yes command echos "y" continuously until killed, then it will never get done right? If it will never get done then how does it pipe it's output to the next command??
yaquawa's user avatar
  • 111
1 vote
1 answer
360 views

yes produces a stream of "y" chars, or other requested. If Unixen have a pseudodevice for random numbers, why not useful streams like this too?
interstar's user avatar
  • 1,127
11 votes
1 answer
28k views

How to pipe a Y or yes to a program while invoking with sudo? We can type like this yes | command yes | yum update How to pipe the y from yes into a program via sudo like the following? yes| sudo ...
Abhik Bose's user avatar
  • 2,136
1 vote
1 answer
7k views

Using the command yes you can make a loop in the Linux terminal.  How do you exit out of said loop?  (I tried Ctrl+C but it didn't work).
John D's user avatar
  • 121
3 votes
1 answer
34k views

I am trying to write a non-interactive system update script. Question: if the following works well: yes | dpkg --configure -a will the following work also very well?: yes | apt-get install --fix-...
Vlastimil Burián's user avatar
68 votes
3 answers
11k views

Let me give an example: $ timeout 1 yes "GNU" > file1 $ wc -l file1 11504640 file1 $ for ((sec0=`date +%S`;sec<=$(($sec0+5));sec=`date +%S`)); do echo "GNU" >> file2; done $ wc -l file2 ...
Pandya's user avatar
  • 25.8k
3 votes
2 answers
3k views

Let's say I have ls | xargs -n1 -p rm, how do I use yes or yes n to automatically answer the questions generated by the -p flag? I tried yes n | (ls | xargs -n1 -p rm) but didn't work. UPDATE: The ...
Gabriel's user avatar
  • 139
54 votes
6 answers
30k views

There is a yes command in unix/linux which basically infinitely prints y to the stdout. What is the point of it, and how is it useful?
Cemre's user avatar
  • 667