Re: sh read on files missing the final newline
Martin Neitzel <[email protected]> Wed, 8 Jul 2026 19:26:29 +0200 (CEST)
| Newsgroups | gmane.os.netbsd.devel.userlevel |
|---|---|
| Organization | Gaertner Datensysteme, Marshlabs |
| Message-ID | <[email protected]> |
EF> The problem came up when a colleague edited a file with emacs, which seems EF> to allow a non-terminated final line, and the shell script interpreting EF> that file ignored that line, which lead to interesting results and was EF> quite hard to spot. EAMCS: Eighty Modes And Continuing Surprises (setq-default require-final-newline t) in .emacs to the rescue, IIRC. (I eventually went back to straight vi(1).) Martin