Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2018 11:03:55 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Devin Teske <dteske@freebsd.org>, "Conrad E. Meyer" <cem@freebsd.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r341803 - head/libexec/rc
Message-ID:  <CANCZdfqtyvxCBwdwDQ4Raeven2LmaPd3C-c---pVFhHDWBKfxA@mail.gmail.com>
In-Reply-To: <dafbcc18-146f-2e4f-e1e9-346d7c05b096@FreeBSD.org>
References:  <201812110138.wBB1cp1p006660@repo.freebsd.org> <2a76b295-b2da-3015-c201-dbe0ec63ca5a@FreeBSD.org> <98481565-CDD7-4301-B86B-072D5B984AF7@FreeBSD.org> <dafbcc18-146f-2e4f-e1e9-346d7c05b096@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 11, 2018, 9:55 AM John Baldwin <jhb@freebsd.org wrote:

> The 'read' builtin in sh can't use buffering, so it is always going to be
> slow
>

It can't use it because of pipes. The example from the parts of this that
was on IRC was basically:

foo | (read bar; baz)

Which reads one line into the bar variable and then sends the rest to the
bar command.

Warner

>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqtyvxCBwdwDQ4Raeven2LmaPd3C-c---pVFhHDWBKfxA>