ed
NAME
ed - text editor
SYNOPSIS
ed [file]
DESCRIPTION
The editor. Every line you type goes to ed until you type q.
COMMANDS
a append lines after the current one; a lone . ends it
i insert before the current line
c change lines
d delete lines
p print lines
n print lines with numbers
s/old/new/[g] substitute on the addressed lines
w [file] write out; prints the byte count
r file read a file in
= print a line number
q quit; refuses once if the buffer is modified
Q quit without writing
h explain the last ?
H leave explanations on
ADDRESSES
A number, . for the current line, $ for the last, /pattern/ to search,
a,b for a range, and 1,$ or % for the whole buffer.
DIAGNOSTICS
?
That is the entire diagnostic. It is not a fault in this simulation.
h will explain the last one, and after three in a row ed relents and
says how to get out - which the real editor never did.
SEE ALSO
sed(1), cat(1)