MPE/iX Shell and Utilities Reference Manual, Vol 1

ed(1) MPE/iX Shell and Utilities ed(1)
.kl marks the addressed line with the mark name l which is a single lowercase letter of
the alphabet. This lets you refer to a marked line with the construct ´l. This is called
an absolute address because it always refers to the same line, regardless of changes
to the buffer.
.,.l displays the addressed range of lines, representing non-printable (control) characters
visibly. ed sets the current line number to the last line so displayed. You can append
this command to most other commands to check on the effect of those commands.
.,.ma moves the addressed lines to the point immediately following the line given by the
address a. The address a must not be in the range of addressed lines. If address a is
0, ed moves the lines to the beginning of the buffer. The last line moved becomes
the new current line.
.,.n displays the addressed lines in a way similar to the p command, but ed puts the line
number and a tab character at the beginning of each line. The last line displayed
becomes the new current line. You can append n to any command other than E, e, f,
Q, q, r, w,or! to check on the effect of that command.
P turns on command prompting. If you specified the –p prompt option on the ed com-
mand line, ed displays the prompt string whenever it is ready for you to type in
another command. If you did not specify –p, ed uses the * character as a prompt. If
command prompting is currently turned on, issuing the P command turns it off.
.,.p displays the addressed lines. The last line displayed becomes the new current line.
You can append p to any command other than E, e, f, Q, q, r, w,or! to check on the
effect of that command.
Q quits unconditionally, without checking for buffer modifications.
q exits edIf you have made changes to the buffer since the last save, ed issues a warn-
ing. Entering the q command again lets you quit, regardless of unsaved changes.
$r [file]
reads the contents of file into the buffer after the addressed line. If the address is 0,
ed places the text before the first line in the buffer. If you do not specify file, ed uses
the remembered file name; if no remembered file name exists, file becomes the new
remembered name. The r command displays the number of bytes read from file
unless you specified the –s option. The last line read from the file becomes the new
current line. If file is replaced by !, the rest of the line is considered a shell command
line, the output of which is to be read.
.,.s/regexp/new/[flags]
searches the specified range of lines for strings matching the regular expression
regexp. Normally the s command replaces the first such matching string in each line
with the string new. The s command sets the current line number to the last line on
Commands and Utilities 1-199