The edline program is a small line editor, written for
FreeDOS as a functional clone of the old MS-DOS program edlin. It
differs from edlin in that first, it's free software, and second, the
user interface is slightly different in a few places. The reason for
the difference is so that the user does not have to type in control
characters mandated by edlin's syntax.
Opens the file (if specified) for editing. If no file is specified,
edline begins with a blank document.
Edline's Internal Commands
where X is a hex digit (0-9, a-f, A-F) - hexadecimal constant
where O is an octal digit (0-7) - octal constant
In the following command lists, brackets [ ] represent
optional constructs. The #
symbol represents a line number, which is either a string of digits,
a period representing the current line, a dollar sign ($)
representing the last line in the file, or a line number added or
subtracted from another line number, so that
prints the current line and the succeeding line.
A dollar sign in the following lists represents a
string of characters. They may be enclosed in either single or double
quotes and may contain the following escape sequences:
# - EDIT A SINGLE
The edline program outputs the single line indicated by
the number, and the next inputted line replaces the outputted line in
a - APPEND
This command is equivalent to $+1i
COPY A RANGE OF LINES
This command copies a block of consecutive lines to
another location in the buffer. The parameters are:
- The first line you want to copy (default =3D =
- The last line you want to copy (default =3D current
- The line before which you want to insert the block
- The number of times you want to copy the block
(default =3D 1)
After edline copies lines, you may use the l
(list) command to see the correctly renumbered lines.
[#][,#]d - DELETE A BLOCK OF LINES
This command deletes a block of consecutive lines. The
parameters are the first and last line of the block to be deleted.
If you omit the second parameter, it deletes only the
line specified in the first parameter. If you omit the first
parameter, it deletes the block from the current line to the line
specified in the second parameter (be sure to include the comma).
Omitting both parameters causes the current line to be deleted.
e filename - SAVE
This command is equivalent to:
[#]i - INSERT =
This command enters insert mode. Its parameter is the
line number before which you want to insert lines.
While inserting, escape sequences such as those above
are legal to type in. To exit insert mode, type a period (.) on an
otherwise blank line (if you need a line with just a period, escape
After exiting insert mode, the line after the inserted
text becomes the current line unless the insertion was appended to
the end of the text, in which case the last line of the text becomes
the new current line.
[#][,#]l - LIST
This command lists lines of text on the screen. If you
omit the first parameter, the command starts showing text beginning
with 11 lines of text before the current line. Omitting the second
parameter shows a page of text beginning with the line specified in
the first parameter. Omitting both shows one page of text starting at
11 lines before the current line. In all cases, if the number of
lines is larger than the number of lines in a page, the program will
prompt after each page of lines.
[#],[#],#m - MOVE
This command moves a block of text to the line before
the number specified in the third parameter. It is similar to
copying, then deleting the original block.
[#][,#]p - =
This is similar to l
except that the default page starts with the current line instead of
11 lines before.
q - QUIT
This command replaces all occurrences of the first
string with the second between the two lines specified. An omitted
first parameter starts the replacing at the line after the current
line; an omitted second parameter stops the replacing at the last
line of the file.
The question mark sends a confirmation message before
SEARCH FOR SUBSTRING
This command searches for the first line containing the
substring specified. Omitting the first parameter causes the search
to start on the current line; omitting the second causes the search
to stop at the end of the file.
The question mark causes the search to send a
confirmation message. Saying no to the confirmation message continues
the search; saying yes ends it.
The current line will be reset to the line where the
search ended if it was successful.
[#]t filename -
This command causes the contents of the file to be
inserted before the line number specified. If the line number is
omitted, the default is the current line.
[#]w filename -
This command causes the first number of lines specified
by the parameter to be written to the file specified. If the
parameter is omitted, it will write all the lines=20
in the buffer to the file.
Copyright 2003 Gregory Pietsch
This file forms part of The FreeDOS HTML Help Documentation, and is covered
under its terms: see index.htm