Commodore PC Ms-Dos 3.2 User's Manual page 212

Table of Contents

Advertisement

140 MS-DOS User's Reference
Some Tips for Using Edlin Commands
Once you have started editing a file with edlin, you can use the
\^J
edlin commands to edit lines of text in it. Here are a few things
to remember when using edlin commands:
■ You can use pathnames in commands. For example, by typing
the following command you can edit a file named report, may
in a subdirectory named \sharpe\budget:
,
edlin
\sharpe\budget\report.may
■ You can reference line numbers relative to the current line,
\^J
which edlin shows with an asterisk (*). To indicate lines
before the current line, use a minus sign with a number; to
indicate lines after the current line, use a plus sign with a
i
I
number. The following command, for example, lists 10 lines
before the current line, the current line, and 10 lines after the
current line:
,
i
-10,+10L
Note
A capital L is used here for the L (list) command to
avoid confusion with the number one. A lowercase 1 would
work just as well.
.
>
■ You can type edlin commands with or without a space
between the line number and command. For example, for
M
deleting line 6, the command 6d is the same as 6 d.
■ You can type multiple commands on one command line. Just
type them one after another.
I)
But if you want to use the edlin line (edit) command to edit
a specific line, you have to separate the line number from the
other commands with a semicolon.
i
)
To end a string in an S (search) or R (replace) command, just
press control-z instead of the return key. The following com
mand line, for example, edits line 15, then displays lines 10
i
)
through 20 on the screen:
^-^
15;-5,+5L
The command line in the next example searches for the words
monthly budget and then displays five lines before and five
lines after the line that contains monthly budget. Also, in this
\^J
example and in those that follow, you'll see control key

Advertisement

Table of Contents
loading

Table of Contents