AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
ED ( 1 ) ED ( 1) command list is equivalent to the p command. The g, G, v, and V commands are not permitted in the command list . See also BUGS and the last paragraph before FILES below. (1,$ )GjREj h H ( . )i In the interactive Global command, the first step is to mark every line that matches the given RE. Then, for every such line, that line is printed, • is changed to that line, and any one command (other than one of the a, c, i, g, G, v, and V commands) may be input and is executed. After the execution of that command, the next marked line is printed, and so on; a new-line acts as a null command; an & causes the re-execution of the most recent command executed within the current invocation of G. Note that the commands input as part of the execution of the G command may address and affect any lines in the buffer. The G command can be terminated by an interrupt signal (ASCII DEL or BREAK). The help command gives a short error message that explains the reason for the most recent ? diagnostic. The Help command causes ed to enter a mode in which error messages are printed for all subsequent ? diagnostics. It will also explain the previous ? if there was one. The H command alternately turns this mode on and off; it is initially off. The insert command inserts the given text before the addressed line; • is left at the last inserted line, or, if there were none, at the addressed line. This command differs from the a command only in the placement of the input text. Address 0 is not legal for this command. The maximum number of characters that may be entered from a terminal is 256 per line (including the newline character). ( . ' .+1 )j The join command joins contiguous lines by removing the appropriate new-line characters. If exactly one address is given, this command does nothing. ( . )kx The mark command marks the addressed line with name x, which must be a lower-case letter. The address 1x then addresses this line; � • is unchanged. ( . ' . )I The list command prints the addressed lines in an unambiguous way: a few non-printing characters (e.g., tab, backspace) are represented by (hopefully) mnemonic overstrikes, all other non-printing characters are printed in - 6-
ED ( 1 ) ED ( 1) octal, and long lines are folded. An l command may be appended to any other command other than e, /, r, or w. (.,.)rna The move command repositions the addressed line(s) after the line addressed by a. Address 0 is legal for a and causes the addressed line(s) to be moved to the beginning of the file; it is an error if address a falls within the range of moved lines; . is left at the last line moved. ( . ' . ) n The number command prints the addressed lines, preceding each line by its line number and a tab character; . is left at the last line printed. The n command may be appended to any other command other than e, f, r, or w. ( . ' . )p The print command prints the addressed lines; . is left at the last line printed. The p command may be appended to any other command other than e, /, r, or w; for example, dp deletes the current line and prints the new current line. p q The editor will prompt with a * for all subsequent commands. The P command alternately turns this mode on and off; it is initially off. The quit command causes ed to exit. No automatic write of a file is done (but see DIA GNOSTICS below). Q The editor exits without checking if changes have been made in the buffer since the last w command. ( $ ) r file The read command reads in the given file after the addressed line. If no file name is given, the currentlyremembered file name, if any, is used (see e and f commands). The currently-remembered file name is not changed unless file is the very first file name mentioned since ed was invoked. Address 0 is legal for r and causes the file to be read at the beginning of the buffer. If the read is successful, the number of characters read is typed; • is set to the last line read in. If file is replaced by !, the rest of the line is taken to be a shell (sh( l)) command whose output is to be read. For example, "$r !Is" appends current directory to the end of the file being edited. Such a shell command is not remembered as the current file name. ( . , . )sl REI replacement I or ( . , . )sl RE /replacement I g The substitute command searches each addressed line for an occurrence of the specified RE. In each line in which a match is found, all (non-overlapped) matched strings are - 7-
- Page 253 and 254: CRYPT { l ) ( Domestic Version Only
- Page 255 and 256: CSPLIT ( 1) CSPLIT (l) NAME csplit
- Page 257 and 258: CU ( lC ) CU ( lC ) NAME cu - call
- Page 259: CU(lC) CU ( lC ) BUGS Cu buffers in
- Page 262 and 263: CUT ( 1) CUT(l) DIAGNOSTICS line to
- Page 264 and 265: CW(l) CW (l) .OW Start of text to b
- Page 266 and 267: CW (l) CW (l) Documents that contai
- Page 268 and 269: .� .• \ __ }
- Page 270 and 271: DATE(l) DATE(l) DIAGNOSTICS No perm
- Page 272 and 273: DC( 1) DC (1) x =x The top two elem
- Page 275 and 276: DD ( 1 ) DD ( 1) NAME dd - convert
- Page 277 and 278: � I DELTA ( l ) DELTA (I) NAME de
- Page 279 and 280: DELTA ( 1) DELTA (!) WARNINGS Lines
- Page 281: DEROFF (l) DEROFF (l) NAME derofi -
- Page 284 and 285: DIFF ( 1) DIFF ( 1) -e producing a
- Page 287: DIFF3 ( 1 ) DIFF3 (1) NAME diff3 -
- Page 291: DIRCMP ( 1) DIRCMP ( 1) NAME dircmp
- Page 295 and 296: DUMP ( 1 ) DUMP(!) NAME dump - dump
- Page 297: ECHO (l) ECHO (l) NAME echo - echo
- Page 300 and 301: ED ( l ) ED {1) the RE. The REs all
- Page 302 and 303: ED (l) ED (1) . 6. FILES below. A R
- Page 306 and 307: ED (1) ED (l) replaced by the repla
- Page 308 and 309: ED (l) ED (1) FILES /tmp/e# tempora
- Page 311: ENV ( 1) ENV(l) NAME env - set envi
- Page 314 and 315: EQN(l) EQN( 1) [ • '+ � ] � l
- Page 316 and 317: � I )
- Page 318 and 319: EX (l) BUGS EX (l) The undo command
- Page 320 and 321: EXPR(l) EXPR ( l ) 3. 4. returns th
- Page 323 and 324: FC(l) ( AT&T UNIX PC only ) FC ( l
- Page 325: FILE ( 1 ) FIT..E ( 1 ) NAME file -
- Page 328 and 329: FIND ( 1 ) FIND ( 1 ) -print -cpio
- Page 330 and 331: GET(l) -b -ilist -xlist GET(l) furt
- Page 332 and 333: GET(l) GET(l) TABLE 1. Determinatio
- Page 334 and 335: GET(l) GET(l) generated by the get.
- Page 337 and 338: GETOPT ( 1) GETOPT ( l ) NAME getop
- Page 339: GREEK (l) GREEK(l) NAME greek - sel
- Page 342 and 343: GREP ( 1) GREP (1) The order of pre
- Page 344 and 345: � '--- I I I I I I f)
- Page 346 and 347: · r1 . .... .. ._ _ . . r1 ' ·
- Page 348 and 349: HP(l) HP (1) is adjacent to an ASCl
- Page 351: ID ( 1 ) ID ( 1) NAME id - print us
ED ( 1 ) ED ( 1)<br />
octal, and long lines are folded. An l command may be<br />
appended to any other command other than e, /, r, or w.<br />
(.,.)rna<br />
The move command repositions the addressed line(s) after<br />
the line addressed by a. Address 0 is legal for a and<br />
causes the addressed line(s) to be moved to the beginning<br />
of the file; it is an error if address a falls within the range<br />
of moved lines; . is left at the last line moved.<br />
( . ' . ) n<br />
The number command prints the addressed lines, preceding<br />
each line by its line number and a tab character; . is<br />
left at the last line printed. The n command may be<br />
appended to any other command other than e, f, r, or w.<br />
( . ' . )p<br />
The print command prints the addressed lines; . is left at<br />
the last line printed. The p command may be appended<br />
to any other command other than e, /, r, or w; for example,<br />
dp deletes the current line and prints the new current<br />
line.<br />
p<br />
q<br />
The editor will prompt with a * for all subsequent commands.<br />
The P command alternately turns this mode on<br />
and off; it is initially off.<br />
The quit command causes ed to exit. No automatic write<br />
of a file is done (but see DIA GNOSTICS below).<br />
Q<br />
The editor exits without checking if changes have been<br />
made in the buffer since the last w command.<br />
( $ ) r file<br />
The read command reads in the given file after the<br />
addressed line. If no file name is given, the currentlyremembered<br />
file name, if any, is used (see e and f commands).<br />
The currently-remembered file name is not<br />
changed unless file is the very first file name mentioned<br />
since ed was invoked. Address 0 is legal for r and causes<br />
the file to be read at the beginning of the buffer. If the<br />
read is successful, the number of characters read is typed;<br />
• is set to the last line read in. If file is replaced by !, the<br />
rest of the line is taken to be a shell (sh( l)) command<br />
whose output is to be read. For example, "$r !Is" appends<br />
current directory to the end of the file being edited. Such<br />
a shell command is not remembered as the current file<br />
name.<br />
( . , . )sl REI replacement I or<br />
( . , . )sl RE /replacement I g<br />
The substitute command searches each addressed line for<br />
an occurrence of the specified RE. In each line in which a<br />
match is found, all (non-overlapped) matched strings are<br />
- 7-