On 2024-03-24 06:06, David G. Pickett wrote:
Perhaps the man page should warn users that such last lines are ignored.
They aren't ignored. And the documentation already covers this issue, on its very first page:
https://www.gnu.org/software/grep/manual/html_node/Introduction.htmlThis says, "If the final byte of an input file is not a newline, grep silently supplies one."
I doubt whether this minor issue should be covered in the man page, as it is merely a brief summary of the documentation.