Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Thanks very much, It really works. I test and find something differences between these two commands. It seems echo yes | program can end the program immediately and correctly after it was run, whereas yes yes | program cannot. Could you please give me details on this issue? Commented Aug 24, 2017 at 18:21
  • 1
    The first will send one "yes"; the second sends as many as your program will read. Commented Aug 24, 2017 at 19:01