Subject: bug#16329: `head --lines=-0' prints nothing if no newline at the EOF

From: Paul Eggert <[email-masked]>
Date: Fri, 03 Jan 2014 09:34:28 -0800

Pádraig Brady wrote:
> It states that text files can have zero or more lines,
> implying that the trailing new line is optional.

I think Eric's right here; if the file is nonempty,
a trailing newline is required.

I'm old enough to remember when text files were not
allowed to be empty (!).  Totally bizarre, but that's
the way POSIX was until 2008.  Before that, every text
file had to end with a newline byte.  See:

http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392