Jump to content

Edlin

From Alfawiki
Edlin
Company typeSoftware
IndustryComputer software
Founded1980; 46 years ago (1980)
FounderTim Paterson
ProductsLine editor

Edlin is a line editor that served as the sole text editor bundled with early releases of IBM PC DOS, MS-DOS, and OS/2. Although it was superseded in MS-DOS 5.0 by the full-screen MS-DOS Editor and later by Microsoft Notepad in Microsoft Windows, Edlin continued to be included in 32-bit Microsoft operating systems up through Windows Server 2008 and Windows 10.

History

Developed by Tim Paterson in 1980 within a two-week timeframe, Edlin was created for Seattle Computer Products's 86-DOS (also known as QDOS). Its design was influenced by the ED context editor from CP/M, which itself drew inspiration from the DEC PDP-10 TOPS-10 EDIT text editor.

Following Microsoft's acquisition of 86-DOS and its evolution into MS-DOS, Edlin was incorporated in versions 1.0 through 5.0. Beginning with MS-DOS 6, it was replaced by the full-screen MS-DOS Editor.

Edlin was omitted from Windows 95, 98, and ME, all based on MS-DOS 7. Nevertheless, it remained part of 32-bit editions of Windows NT and its successors—including Windows 10—because their DOS compatibility layer, the Virtual DOS Machine (NTVDM), is derived from MS-DOS 5.0. Unlike other DOS utilities, Edlin was never ported to a native Win32 application and does not support contemporary features such as long filenames.

The FreeDOS variant of Edlin was created by Gregory Pietsch.

Usage

Edlin provides a concise collection of commands accessible by typing ? at the command prompt.

The L command lists file contents along with line numbers; for example, 1,6L displays lines one through six. The active line is indicated by an * symbol.

To modify a line, input its number followed by the replacement text; pressing Ctrl-C cancels edits while preserving the * marker.

Using I (optionally followed by a line number) inserts new lines before the specified or current line; pressing Ctrl-C exits insert mode.

Key commands include:

i – Insert new text lines.
D – Remove specified lines (e.g., 2,4d deletes lines two to four).
R – Replace text within a range of lines; including ? prompts for confirmation on each substitution. This operation is case-sensitive.
S – Search for text within a line range, requesting confirmation for each occurrence found.
P – Print lines in a given range and sets the final line as current.
T – Transfer content from another file into the current one at a designated line.
W – Write changes to disk.
E – Save modifications and exit Edlin.
Q – Quit without saving any changes.

Scripts

Edlin supports batch editing through command redirection, allowing automated operation via scripts:

edlin < script

FreeDOS Edlin

An open-source Edlin clone licensed under GPL is available through FreeDOS. This version supports long filenames and operates on MS-DOS as well as Linux and Unix platforms, expanding cross-environment compatibility.

See also

Further reading

External links