On 8/23/26 6:45 PM, Sam James wrote:
Hi,

bash currently probes a pipe w/ lseek, sees it isn't seekable, and then
falls back to reading 1 byte at a time.

OK. Are we talking about the parser reading input, the read builtin, or
mapfile?

I'm not that familiar with tee(2), since it's Linux-specific. I guess
the idea would be to tee the input pipe into another random pipe, read
all the data from that second pipe, scan forward for the delimiter
(which differs depending on context), then read that many bytes from
the input pipe (up to the number of bytes returned by tee)?
Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to