Clean up deleted files.
This commit is contained in:
parent
20d732999d
commit
efcd17acc4
1314
bin/ed/doc/ed-1003.2
1314
bin/ed/doc/ed-1003.2
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
This version of ed is not strictly POSIX compliant, as described in the
|
||||
POSIX 1003.2 Draft 11.2 document (see the file `ed-1003.2'). BSD commands
|
||||
have been implemented wherever they do not conflict with the POSIX
|
||||
standard. For backwards compatibility, the POSIX rule that says a range
|
||||
of addresses cannot be used where only a single address is expected has
|
||||
been relaxed (see the file `legal-addrs').
|
||||
|
||||
The BSD commands included are:
|
||||
1) the `W' command for appending text to an existing file,
|
||||
2) the `s' command (i.e., s[rgp]*) to repeat a previous substitution,
|
||||
3) the `z' command for scrolling through the buffer, and
|
||||
4) the `wq' command for exiting after a write.
|
||||
|
||||
BSD line addressing syntax (i.e., `^' and `%' - see the file
|
||||
`legal.addrs') is also recognized.
|
||||
|
||||
The POSIX interactive global commands `G' and `V' are extended to support
|
||||
multiple commands, including `a', `i' and `c'. The command format is the
|
||||
same as for the global commands `g' and `v', i.e., one command per line
|
||||
with each line, except for the last, ending in a backslash (\).
|
||||
|
||||
If crypt is available, files can be read and written using DES encryption.
|
||||
The `x' command prompts the user to enter a key used for encrypting/
|
||||
decrypting subsequent reads and writes. If only a newline is entered as
|
||||
the key, then encryption is disabled. Otherwise, a key is read in the
|
||||
same manner as a password entry. The key remains in effect until
|
||||
encryption is disabled. For more information on the encryption algorithm,
|
||||
see the bdes(1) man page. Encryption/decryption should be fully compatible
|
||||
with SunOS DES.
|
||||
|
||||
An extension to the POSIX file commands `E', `e', `r', `W' and `w' is that
|
||||
<file> arguments are processed for backslash escapes, i.e., any character
|
||||
preceded by a backslash is interpreted literally. A trailing backslash
|
||||
is ignored. If the first unescaped character of a <file> argument is a
|
||||
bang (!), then the rest of the line is interpreted as a shell command,
|
||||
and no escape processing is performed by ed. This rule does not apply to
|
||||
the 'f' command (described below).
|
||||
|
||||
While the default file name cannot be set to a shell command (i.e.,
|
||||
!<shell-cmd>) via any of the `r', `w', and `e' commands, POSIX evidently
|
||||
does not preclude using the `f' command for this purpose. Upon reading
|
||||
or writing the default file when its name begins with a bang, ed
|
||||
interprets the rest of the line as a shell command and attempts to execute
|
||||
it. Escape processing is not performed in this case.
|
||||
|
||||
If ed is invoked with a name argument prefixed by a bang, then the
|
||||
remainder of the argument is interpreted as a shell command. To invoke
|
||||
ed on a file whose name starts with bang, prefix the name with a backslash.
|
||||
--
|
||||
The following commands are neither part of POSIX 1003.2 D11/2 nor are
|
||||
they supported in this version of ed.
|
||||
|
||||
The vi command: (addr1,addr2) !<shell-cmd> which replaces a range of
|
||||
lines with the output of a shell command is not supported.
|
||||
|
||||
The vi command: [rwe] !!, where !! is replaced by the previous
|
||||
!<shell-cmd> is not supported.
|
@ -1,59 +0,0 @@
|
||||
The following describes line addressing syntax. This is a combination of
|
||||
both BSD and POSIX.
|
||||
|
||||
An address represents the number of a line in the editor buffer. It is
|
||||
constructed from one of the bases in the table below, optionally followed
|
||||
by an absolute offset. The offset may include any combination
|
||||
of digits, operators (i.e., `+', `-' and `^') and whitespace.
|
||||
Addresses are read from left to right, and their values are computed
|
||||
relative to the current address (i.e., the number reported by the command
|
||||
`.=').
|
||||
|
||||
One exception to the rule that addresses represent line numbers is the
|
||||
address 0. This means "before the first line," and is legal wherever it
|
||||
makes sense.
|
||||
|
||||
An address range is two addresses separated either by a comma or
|
||||
semi-colon. The value of the first address in a range cannot exceed the
|
||||
value of the the second. If an n-tuple of addresses is given where
|
||||
n > 2, then the corresponding range is determined by the last two addresses
|
||||
in the n-tuple. If only one address is expected, then then the last
|
||||
address is used (see the examples below).
|
||||
|
||||
Each address in a comma-delimited range is interpreted relative to the
|
||||
current address. In a semi-colon-delimited range, the first address is
|
||||
used to set the current address, and the second address is interpreted
|
||||
relative to the new current address.
|
||||
|
||||
The following address symbols are recognized:
|
||||
. - current line
|
||||
$ - last line
|
||||
- - previous line; may be repeated with cumulative effect
|
||||
-<n> - <n>th previous line, where <n> is a non-negative number
|
||||
^ - previous line; may be repeated with cumulative effect (BSD)
|
||||
^<n> - <n>th previous line, where <n> is a non-negative number
|
||||
+ - next line; may be repeated with cumulative effect
|
||||
+<n> - <n>th next line, where <n> is a non-negative number
|
||||
% - first through last lines, i.e., equivalent to: 1,$ (BSD)
|
||||
, - first through last lines, i.e., equivalent to: 1,$ (POSIX)
|
||||
; - current through last lines, i.e., equivalent to: .,$ (POSIX)
|
||||
/pat/ - next line containing pattern pat
|
||||
?pat? - previous line containing pattern pat
|
||||
[0-9]* - line <n>, where <n> is a number in the range [0,$]
|
||||
<ws><n> - whitespace <ws> followed by a number <n> is interpreted as +<n>
|
||||
'<lc> - line previously marked by k command, where <lc> is a
|
||||
lower case letter
|
||||
|
||||
Examples:
|
||||
The address tuple `4;+1' is equivalent to the address range `4,5'.
|
||||
The address tuple `1;+2,+3' is equivalent to the range `3,4'.
|
||||
The address tuple `1;+2;+3' is equivalent to the range `3,6'.
|
||||
The command `1;m+' swaps the first and second lines.
|
||||
The command `0;/pat/r file' reads `file' to after the line containing the
|
||||
pattern pat.
|
||||
The command `t0;/pat/' copies the current line to after the first line
|
||||
containing the pattern pat.
|
||||
|
||||
The last two examples above violate the POSIX rule that says a range cannot
|
||||
be used where at most a single address is expected. This rule has been
|
||||
relaxed to enable such syntax.
|
@ -1,49 +0,0 @@
|
||||
The following commands are recognized. These are a combination of BSD
|
||||
and POSIX. The POSIX version of a command always overrides any BSD
|
||||
version. The commands are shown together with the number of addresses
|
||||
that each accepts.
|
||||
|
||||
!<shell-cmd> - run <shell-cmd> via sh {1} (POSIX)
|
||||
($)= - print line number
|
||||
(.)a - append text to the buffer
|
||||
(.,.)c - change lines in the buffer
|
||||
(.,.)d - delete lines from the buffer
|
||||
E <file> - edit a file unconditionally {1}
|
||||
E !<shell-cmd> - edit the standard output of <shell-cmd> {1} (POSIX)
|
||||
e <file> - edit a file {1}
|
||||
e !<shell-cmd> - edit the standard output of shell-cmd {1} (POSIX)
|
||||
f <file> - set the default file to <file> {1}
|
||||
(1,$)G/pat/ - interactively edit lines matching a pattern (POSIX) {1}
|
||||
(1,$)g/pat/<cmd-list> - apply <cmd-list> to lines matching a pattern
|
||||
H - print explanations of all errors (POSIX)
|
||||
h - print explanation of the last error (POSIX)
|
||||
(.)i - insert text in the buffer
|
||||
(.,.+1)j - join lines in the buffer
|
||||
(.)k<lc> - mark a line for later '<lc> addressing
|
||||
(.,.)l - print lines unambiguously to stdout
|
||||
(.,.)m(.) - move lines in the buffer
|
||||
(.,.)n - enumerate lines to stdout (POSIX)
|
||||
P - toggle command prompt (POSIX)
|
||||
(.,.)p - print lines to stdout
|
||||
Q - quit ed unconditionally
|
||||
q - quit ed
|
||||
($)r <file> - read a file {1}
|
||||
($)r !<shell-cmd> - read the stdout of <shell-cmd> {1} (POSIX)
|
||||
(.,.)s/pat/sub/g - substitute matching text in a line via a template
|
||||
(.,.)s/pat/sub/<n> - substitute the <n>th match in a line (POSIX)
|
||||
(.,.)s[rgp]* - repeat the last substitution (BSD)
|
||||
(.,.)t(.) - copy (transfer) lines in the buffer
|
||||
u - undo the last command (POSIX)
|
||||
(1,$)V/pat/ - interactively edit lines not matching a pattern (POSIX) {1}
|
||||
(1,$)v/pat/<cmd-list> - apply <cmd-list> to lines not matching a pattern
|
||||
(1,$)W <file> - append lines to a file (BSD)
|
||||
(1,$)W !<shell-cmd> - write lines to the stdin of <shell-cmd> (POSIX)
|
||||
(1,$)w <file> - write lines in the buffer to a file
|
||||
(1,$)w !<shell-cmd> - write lines to the stdin of <shell-cmd> (POSIX)
|
||||
x - prompt for an encryption key (SunOS) {1}
|
||||
(.+1)z<rows> - page <rows> lines at a time to stdout (BSD)
|
||||
(.)<newline> - print line to stdout (BSD)
|
||||
|
||||
--
|
||||
{1} See the file `extensions' for additional information on these
|
||||
commands.
|
Loading…
Reference in New Issue
Block a user