Re: sh read on files missing the final newline

Edgar Fuß <[email protected]> Tue, 7 Jul 2026 23:09:37 +0200
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
> It depends on what you consider correct, surely.
Sure.

Sorry, I meant
> Silently act as if the missing newline were there?

The problem came up when a colleague edited a file with emacs, which seems 
to allow a non-terminated final line, and the shell script interpreting 
that file ignored that line, which lead to interesting results and was quite 
hard to spot.