ed
ed is the standard text editor.
ed has two modes: command and input. By default it is in command mode. Use i or a to insert or append text and when finished input a . on a line all by itself to return to command mode.
A summary of ed commands
command | description | ||
a | append text to the buffer | ||
i | insert text at the current line in the buffer | ||
p | print the current line - try 1p to print the first line | ||
q | quit ed - to quit without saving, type q! | ||
s | search/replace - try s/old/new | ||
w | write out the buffer to disk - w filename | ||
. | return to command mode from append or input mode |
If you have made an error, ed will only respond with ?