| EDLIN(1) | EDLIN(1) |
edlin - FreeDOS line-oriented text editor
edlin [filename]
The FreeDOS edlin program is a small line-oriented text editor. Unline screen-based editors, edlin does not display the text being edited at all times, instead only showing parts of it upon the user's request.
When invoked, edlin presents the user a command line allowing them to manipulate the text by applying operations on the specified lines of the text file. All commands operate on whole lines or ranges of lines.
In general, the structure of an edlin command is as follows:
A line number can be one of the following:
String parameters may be enclosed in either single or double quotes, and may contain the following escape sequences:
The edlin program supports the following editor commands:
After copying lines, use the l (list) command to see the new line numbers.
If you omit the first parameter, delete the block from the current line to the line specified in the second parameter (be sure to include the comma).
If you omit the second parameter, delete only the line specified in the first parameter.
Omitting both parameters deletes the current line.
This verifies whether the user actually wants to quit before doing so. To quit, answer the "Abort edit (Y/N)?" prompt with "yes."
While entering text, you can use the escape sequences from above.
To exit insert mode, type . (full stop) on a line by itself. (If you need a line with just a period, you need to enter it as \.)
After exiting insert mode, the line after the inserted text becomes the current line, unless the insertion was appended to the end of the buffer, in which case the last line in the buffer becomes the new current line.
If you omit the second parameter, shows a screen of text beginning with the line specified in the first parameter.
If you omit both parameters, show a screen of text starting at 11 lines before the current line.
If the number of lines to show is longer than the number of lines on the screen, edlin will prompt after each screen.
This verifies whether the user actually wants to quit before doing so. To quit, answer the \"Abort edit (Y/N)?\" prompt with \"yes.\"
If you omit the first parameter, start replacing at the line after the current line.
If you omit the second parameter, stops replacing text at the last line of the buffer.
If you include the ? (question mark), edlin will print a confirmation message before replacing text.
If you omit the first parameter, start searching from the current line.
If you omit the second parameter, stop the search at the end of the buffer.
If you include the ? (question mark), edlin will print a confirmation message. Responding "no" to the confirmation message continues the search; "yes" ends the search.
If the search found the substring, the current line will be set to the line where the search ended.
If you omit the line number, insert before the current line.
If you omit the number parameter, write all the lines in the buffer to the file.
edlin aborts and returns non-zero if the standard input is closed when it expects a command, e.g. if the user presses Control-D at the command prompt.
The FreeDOS edlin was developed by Gregory Pietsch in 2003.
The original edlin was created by Tim Paterson in 1980, inspired by the CP/M context editor ED, which itself was distantly inspired by the Unix ed line editor.
Unlike the original edlin, the FreeDOS edlin uses a comma (,) as a parameter separator for the "replace" command (r) instead of the DOS end-of-file control character (Control-Z).
The command l, when specified in upper case (L) is synonymous to p and starts printing from the current line.
Copyright (C) 2003-2024 Gregory Pietsch
Copyright (C) 2025 Andrej Shadura
| 2025-02-20 |