2.0;edstr (edit_stream), revision 1.1, 86/11/20
EDSTR (EDIT_STREAM) -- Edit a stream.
usage: EDSTR [-N] { command | -E command | -F cmdfile ...} [pathname]
FORMAT
EDSTR [-N] { command | -E command | -F cmdfile ...} [pathname]
EDSTR copies the named input files to standard output, performing editing as
directed by EDSTR commands in the command line or in the named command file.
ARGUMENTS
If neither the -E or -F argument is specified, EDSTR assumes that the first
token on the command line without a hyphen is an EDSTR command (see below) and
that the remaining tokens (if any) are pathnames.
command
(optional) Specify a single EDSTR command (except A, C, or I). EDSTR
accepts the ED commands A, C, D, I, P, R, S, W, and =. To
use the A, C, or I commands, place them in a command file
as described below.
Default if omitted: use -E and/or -F
The following two arguments may be repeated and intermixed in any order.
EDSTR executes them in the order in which they appear on the command line.
-E command
(optional) Specify an EDSTR command (except A, C, or I). To use the
A, C, or I commands, place them in a command file as
described below. EDSTR can accommodate commands totaling
approximately 5000 characters (including <text> arguments),
and lines up to 120 characters long.
Default if omitted: use 'command' or -F
-F cmdfile
(optional) Specify a file containing EDSTR commands, one per line.
Control is passed to this file for command processing. See
-E for EDSTR command restrictions.
Default if omitted: use 'command' or -E
pathname
(optional) Specify input file to be edited. Multiple pathnames are
permitted.
Default if omitted: edit standard input
OPTIONS
-N Supress writing of output except for P and W EDSTR
commands. By default, EDSTR writes each line of input to
standard output after editing. If this option is specified,
it must precede any arguments on the command line.
EXAMPLES
$ edstr -e s/joe/mary/g -e '20r add_stuff' infile > outfile
This command first replaces all occurrences of "joe" with "mary", then copies
material in the file "add_stuff" into "infile" following line 20. Results are
written to the file "outfile".
RELATED TOPICS
More information is available. Type:
- HELP EDSTR COMMANDS
for a summary of EDSTR commands.
- HELP ED COMMANDS
for a complete description of the commands.