I recently was at a tech event where there was some discussion about newlines in templates. I pointed out that relying on implicit newlines in template files can lead to problems. The short discussion ended with a statement that files always end in a newline, and people moved on.
So, here are examples how you can bring a file without newlines into existence, even without an editor.
$ echo -ne "foo" > bar $ wc -l bar 0 bar $ cat bar foo$ printf "foo" > baz $ wc -l baz 0 baz