[Toybox] [PATCH] Fix grep to not truncate last character of file provided by -f argument

Rob Landley rob at landley.net
Wed Nov 9 06:29:59 PST 2022


On 11/7/22 16:26, Daniel Mentz via Toybox wrote:
> The command line argument -f allows a user to specify a file that lists
> multiple regular expressions (one per line) to match. It turned out
> that, if the file ended with a new line character (like most text files
> do), then the character just prior to that newline character got
> truncated.

Sigh. A bug I introduced almost exactly 3 weeks before your patch (commit
fd8ef8cac003).

I added a test for it.

Rob


More information about the Toybox mailing list