3 ms·
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 pr
by mook 2y 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.
- paulv 2y agoBack in ~2002 this was the case with cron. Found out the hard way when all the backup tapes we desperately needed were completely empty.
- bityard 2y agoNo, 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.