Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 150011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:13:20+00:00 2026-05-11T09:13:20+00:00

When I do this: find . -name pattern | grep another-pattern Are the processes,

  • 0

When I do this:

find . -name 'pattern' | grep 'another-pattern' 

Are the processes, find and grep, spawned together? My guess is yes. If so, then how does this work?:

yes | command_that_prompts_for_confirmations 

If yes is continuously sending ‘y’ to stdout and command_that_prompts_for_confirmations reads ‘y’ whenever it’s reading its stdin, how does yes know when to terminate? Because if I run yes alone without piping its output to some other command, it never ends.

But if piping commands don’t spawn all the processes simultaneously, then how does yes know how many ‘y’s to output? It’s catch-22 for me here. Can someone explain me how this piping works in *NIX?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:13:21+00:00Added an answer on May 11, 2026 at 9:13 am

    From the wikipedia page: ‘By itself, the yes command outputs ‘y’ or whatever is specified as an argument, followed by a newline, until stopped by the user or otherwise killed; when piped into a command, it will continue until the pipe breaks (i.e., the program completes its execution).’

    yes does not ‘know’ when to terminate. However, at some point outputting ‘y’ to stdout will cause an error because the other process has finished, that will cause a broken pipe, and yes will terminate.

    The sequence is:

    1. other program terminates
    2. operating system closes pipe
    3. yes tries to output character
    4. error happens (broken pipe)
    5. yes terminates
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 505k
  • Answers 505k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You will need to map (change) all the DB calls… May 16, 2026 at 3:26 pm
  • Editorial Team
    Editorial Team added an answer This is an if statement: if (condition1) { // ...… May 16, 2026 at 3:26 pm
  • Editorial Team
    Editorial Team added an answer If you want to go with pure Ruby you can… May 16, 2026 at 3:26 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have this small jquery script that does not work if I remove the
How can I find the name of (default.aspx ) current page or web control
I'm trying to do some batch replacement for/with a fairly complex pattern So far
How would you write this having only batch files and VBScript at your disposal
I use File::Find -> find(\&f, $directory) for find some file with some content. Relevant
i wonder if it's possible to make a RegEx for the following data pattern:
I need to know how I can easily add another series to an existing
This is likely something easy to accomplish, but I'm having difficulty even articulating clearly,
I'm not sure if this can even be achieved, but here goes... :) Lets
Some commands like svn log, for example will only take one input from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.