10

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:

a
.
s/^$/./
Thor
  • 16,942
  • 3
  • 52
  • 69
Staven
  • 223
  • 1
  • 6

2 Answers2

3

the no shell way,

a
a.
.
s/a//
Rony
  • 188
  • 4
0

A bit round about, but use shell redirection:

r !echo .
Thor
  • 16,942
  • 3
  • 52
  • 69