Re: sh read on files missing the final newline

Martin Neitzel <[email protected]> Mon, 6 Jul 2026 22:52:51 +0200 (CEST)
Newsgroups gmane.os.netbsd.devel.userlevel
Organization Gaertner Datensysteme, Marshlabs
Message-ID <[email protected]>
See the "Base Definitions" Volume of SUS.  In SUS4, it's Chapter
3 "Definitions",

	3.395 Text File

	A file that contains characters organized into zero or more
	lines. The lines do not contain NUL characters and none
	can exceed {LINE_MAX} bytes in length, including the
	<newline> character. Although POSIX.1-2008 does not
	distinguish between text files and binary files (see the
	ISO C standard), many utilities only produce predictable
	or meaningful output when operating on text files. The
	standard utilities that have such restrictions always
	specify "text files" in their STDIN or INPUT FILES sections.

							Martin