Home » Questions » Computers [ Ask a new question ]

Why new lines at the end of files?

Why new lines at the end of files?

Why do some of the more technical apps require newlines at the end of files? I've read it has something to do with diffs, but shouldn't diff be able to figure the relative positions of things out on its own?

Asked by: Guest | Views: 275
Total answers/comments: 1
Guest [Entry]

Text file are composed of text lines, which are terminated with newlines (as opposed to being separated by newlines). So omitting the last newline technically makes the last line an incomplete text line.