bug-bash
[Top][All Lists]
Advanced

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

Re: cut loadable outputs extra newlines


From: Lawrence Velázquez
Subject: Re: cut loadable outputs extra newlines
Date: Sat, 13 Aug 2022 22:43:23 -0400
User-agent: Cyrus-JMAP/3.7.0-alpha0-841-g7899e99a45-fm-20220811.002-g7899e99a

On Sat, Aug 13, 2022, at 10:06 PM, Martin D Kealey wrote:
> I note that
> https://pubs.opengroup.org/onlinepubs/009696699/utilities/cut.html says:
> *> The elements in list can be repeated, can overlap, and can be specified
> in any order, but the bytes, characters, or fields selected shall be
> written in the order of the input data.*
>
> The intention behind this is so that cut can be implemented as a small
> state machine using just getchar, putchar, and a counter. This avoids
> copying via a line buffer, and that implies there should be no line-length
> limit.

That is explicitly required:

        INPUT FILES

        The input files shall be text files, except that line lengths
        shall be unlimited.

-- 
vq



reply via email to

[Prev in Thread] Current Thread [Next in Thread]