In ed
, one can retrieve the output of a command into the current buffer by using r !COMMAND
. One can also write a set of lines to the input of a command by using 1,3w !COMMAND
.
However, I cannot determine how to do both simultaneously.
r 1,3w !sort
1,3w !sort: No such file or directory
Is it possible to do this in ed
?