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.

Required fields*

3
  • Note that the output from yes is 23 bytes per line. 356 lines is 8188 bytes, and 357 lines is 8211 bytes. With a buffer of 8 KiB, i.e. 8192 bytes, the first head would read a bit more than 356 lines and pass the rest off to the next part of the pipeline. On your system, you can therefore assume that head reads its input in chunks of 8 KiB. Commented Feb 15 at 9:05
  • 356*23+(23-19)=8192 Commented Feb 15 at 9:19
  • @showkey yes, see head eats extra characters for details. Commented Feb 15 at 10:29