Edlin.com & Edlin.exe

Edlin was the line editor shipped with earlier versions of PC-DOS and MS-DOS, and in the MDOS section of OS/2. A line editor is an editor in which text is edited line by line, rather than being able to freely move around a whole document. It was intended to be used for creating and editing batch files, CONFIG files and the like.

Command line structure

edlin filename.ext

Whether you are editing an old file or creating a new one a filename must be specified, and a drive and/or path may preceed it if needed.


Operations and commands within Edlin

You will be presented with an astrix command prompt *. If you have specified a new file you simply type "i" (insert) to begin typing at line 1. Once you have typed your line press <Enter>. (You can type over the end of the line, up to 253 characters in total, but listings can start to look messy. You will get the prompt for the next line - 2:*. When you want to take a break from typing press Ctrl-C at the line number prompt. This returns you to the command prompt. Note that if you do this in a line with text you will lose that line, or changes to that line (useful if you make a big mistake with an edit).

Listing your text. Type "l" to list what you have typed. The astrix which appears after one of the line numbers indicates the current line. Typically the list starts 11 lines before the current line and extends up to one page. You can type a start line, a finish line or both before the command, as below.

Saving your work and exiting. To save your work you type "e" an the * prompt. Exiting is usually the only way to save your work. If you try to save your file to a full or near full disk you will lose your work. If you are editing an existing file Edlin copies the old file to whatever.BAK backup file. See a note about file name systems.

Do not use "q" unless you have stuffed up an edit "big time" and want to kill the changes as this exits without saving. The "w" write command only works when you are working with huge files that will not fit in RAM and so need to be shuffled back and forth from disk in blocks. Using w then q will not save your edits if you are working on a small file.

Editing text. Often you will want to edit a line of text within a file. To do this type the line number of the line you wish to edit. You will see the line number and full line with the line number prompt and cursor below it. You can move along the line using F1 or the right arrow key. F3 will complete the line. Press <Enter> when finished.

<Road Closed - Under Construction>


Hacked in Edlin by Julian Sortland, © May 1997.
Mail Homepage