The ed Editor ed does not work directly on a file. It works on a copy of the file in a RAM buffer.
All commands require a line number.
Insert text before line 14. Move line 3 to after line 6. 1,4m7 Move lines 1 thru 4 inclusive to the line after line 7. 3c Replace line 3 with all text that you enter. 6r include.txt Read contents of include.txt into the buffer after line 6.