2

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.

0

1 Answer 1

4

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.