Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run the following command:

yiic webapp main /home/david123/domains/

It waits for my answer:

Create a Web application under '/home/david123/domains/'? [Yes|No] 

Rather than entering Yes/No each time I run this command, I would like to pre-supply the answer to the command. What should I append to my original command?

yiic webapp main /home/david123/domains/

share|improve this question
up vote 6 down vote accepted

You should prepend an invocation of yes.

yes Yes | yiic webapp main /home/david123/domains/
share|improve this answer
Thanks a lot for your answer. It has solved my problem. The program only asks me one question so I only need a single yes, right? – bobo Dec 21 '11 at 0:44
The yes command will keep supplying yesses whether the program needs them or not. – David Schwartz Dec 21 '11 at 0:46
Sounds like some former coworkers. – ceejayoz Dec 21 '11 at 1:24
@David Schwartz I didn't know there exists such an interesting command. Thanks a lot for your information. – bobo Dec 21 '11 at 8:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.