I have to finish a writeup of a few coreutils commands for a course at the moment, and I can't think of a starting point for a small practical code example that demonstrates the potential uses of stdbuf
.
Has anyone used it to fix the interaction of a couple specific unix commands?
I know what it does.
It's just that the first commands that came to mind have their own buffering controls, and normal terminal output is line buffered anyway.
It must be popular for appending to logs, yet I can't find a good command to demonstrate there.
In the case of nohup
, are there any commands that are commonly run with it to prevent interruption?
As I mentioned, I am working on this for a course assignment at the moment.
This however doesn't violate any of its rules.
I'm just trying to find a good starting point for these examples.
I don't have one for stdbuf
, and I dislike the rudimentary one I was using for nohup
.
<infile grep1 | sort | grep3
or<infile nl -bp... | sort -nk1,1
becausenl
doesn't have any line-buffering options.