I think I know how I can do this by writing to an external file, but I'm wondering if it's possible to directly insert the contents of a shell command into a UNIX ed buffer. I'm using GNU ed 1.15.
Thanks.
I figured it out. I just do the r command followed by the shell command prefixed by a !. It's just like in ex or vim. You do: r !cal The above would append the result of the cal shell command into the ed buffer.