Re: [RFC] Force stdio output streams to line-buffered mode

2011-02-22 Thread John Baldwin
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 full

Re: [RFC] Force stdio output streams to line-buffered mode

2011-02-20 Thread Jeremie Le Hen
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 be

[RFC] Force stdio output streams to line-buffered mode

2011-02-19 Thread Jeremie Le Hen
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

Re: [RFC] Force stdio output streams to line-buffered mode

2011-02-19 Thread Matthew D. Fuller
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 ad10