Konubinix' opinionated web of thoughts

What's the Point in Adding a New Line to the End of a File? (Unix)


It’s not about adding an extra newline at the end of a file, it’s about not removing the newline that should be there.

A text file, under unix, consists of a series of lines, each of which ends with a newline character (\n). A file that is not empty and does not end with a newline is therefore not a text file.