Hacker News new | ask | show | jobs
by mook 637 days ago
Some old tools had bugs where they'd read a line (up to the new line) and then process it, so if the last line didn't end with a new line they'd never do the processing. So a manual workaround for bugs became the convention.
2 comments

Back in ~2002 this was the case with cron. Found out the hard way when all the backup tapes we desperately needed were completely empty.
No, that is not a bug and there was never such a thing as "manually" adding a trailing newline. All tools add newlines automatically where they should be.

Unix has ALWAYS defined a line of text as being terminated by a newline. The last line in the file is not an exception.