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*

6
  • 12
    Notably python also supports the -u parameter to disable buffering. Commented Dec 19, 2019 at 21:52
  • 1
    Using grep(etc.) like this won't work. By the time you've executed long_running_command it's too late. It'll be buffered before it even gets to grep. Commented Jan 24, 2020 at 15:26
  • This is still buffered. what if one wants to see the line progress... Commented Feb 3, 2020 at 18:48
  • Should this work with grep --line-buffered pattern *many*many*files* | head? It looks like grep processes all the files before feeding the output lines to head Commented Feb 28, 2020 at 11:27
  • 1
    And here I thought I was a grep power user. Commented Jan 2, 2021 at 3:31