The Unix and the Echo (2001)
everything2.com
everything2.com
If you have a file consisting of some lines of text, the file will end with a \n because a line of text (unlike text generally) is typically defined by matching ^[^\n]*\n
Therefore, `echo` with no arguments returns a line of text which contains nothing.
According to the book quoted in the link:
Since a command should by default execute its most commonly used function, ... echo appends the final newline automatically.
It may seem insignificant, but this story highlights, in nerd humour, some of the design philosophy behind Unix.
Classic Kernighan (as the book's co-author).
(Except for the "echo" builtin in /bin/sh, which does not recognise -n.)
https://www.debian.org/doc/debian-policy/ch-files.html#scrip...
I thought this was cursing at me at first!
By the way, if you actually care about your newlines use printf.