On Saturday, February 19, 2011 1:50:43 pm Jeremie Le Hen wrote:
> Hi,
>
> I've been annoyed multiple time when running a command such like
> iostat -x 1 | grep -v ad10 | cat -n
>
> The problem stems from two factors:
> - grep's stdio sees that its stdout is not a terminal, so stdout is
>
On Sat, Feb 19, 2011 at 02:37:29PM -0600, Matthew D. Fuller wrote:
> On Sat, Feb 19, 2011 at 07:50:43PM +0100 I heard the voice of
> Jeremie Le Hen, and lo! it spake thus:
> >
> > I've attached a small patch for stdio, so if the environment variable
> > STDIO_IOLBF is set, the output streams will
On Sat, Feb 19, 2011 at 07:50:43PM +0100 I heard the voice of
Jeremie Le Hen, and lo! it spake thus:
>
> I've attached a small patch for stdio, so if the environment variable
> STDIO_IOLBF is set, the output streams will be line-oriented by default.
> iostat -x 1 | env STDIO_IOLBF=1 grep -v ad
Hi,
I've been annoyed multiple time when running a command such like
iostat -x 1 | grep -v ad10 | cat -n
The problem stems from two factors:
- grep's stdio sees that its stdout is not a terminal, so stdout is
full buffered and not line-buffered;
- iostat produces output too slowly so