Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Author here.

Thanks for reading!

>All the commands in a bash pipeline do start at the same time, but output goes into the pipeline buffer whenever the writing process writes it. There is no specific point where the "output from jobA is ready".

Right, I didn't mean to give the impression that there's a time at which all input from jobA is ready at once. But there is a time when jobB can start reading stdin, and there's a time when jobA closes the handle to its stdout.

The reason I split jobA's output into two commands is to show that jobB starts reading 3 seconds after the command begins, and jobB finishes reading 2 seconds after reading the first output from jobA.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: