tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sed -u option



On Fri, Jun 13, 2014 at 01:08:39AM +0000, Christos Zoulas wrote:
> In article <20140613.040312.453264829.yyamano%kt.rim.or.jp@localhost>,
> Yuji Yamano  <yyamano%kt.rim.or.jp@localhost> wrote:
> >Hi!
> >
> >I just found our sed supports -l option.
> >How about adding -u option for GNU and OpenBSD compatibility?
> 
> OpenBSD:
> -u
> Force output to be line buffered, printing each line as it
> becomes available.  By default, output is line buffered when
> standard output is a terminal and block buffered otherwise.  See
> setbuf(3) for a more detailed explanation.

I wonder if it would be better to get the shell to generate a pipe
that will force line buffering?

Then you could add a shell option and 'fix' a lot of problems in
one go.

Probably takes an extra ioctl in the pipe driver and some collusion
between the shells and libc.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index