What would be the right way to write a line containing only . to a file in ed? The only way I came up with is something like this:
.
ed
a . s/^$/./
the no shell way,
a a. . s/a//
A bit round about, but use shell redirection:
r !echo .