Edlin

From Wikipedia, the free encyclopedia

Edlin is a line editor included with MS-DOS and later Microsoft operating systems. It provides rudimentary capabilities for editing plain text files through a command-driven interface. Line numbers are specified using numerals, and operations are specified using single-character alphabetic commands (e.g. "5d" instructs the program to delete the 5th line of the file).

It was the only text editor provided with MS-DOS before version 5.0 of that system, when it was superseded by the full screen edit editor. It was removed in version 6. However, Edlin is still available in Microsoft Windows operating systems up to and including Windows Vista since NTVDM's DOS support was based on MS-DOS version 5.0. Unlike most other external DOS commands, it has not been transformed into a native, Win32 program. Its persistence can probably be explained by the fact that it can be invoked to automatically perform small modifications on text files, by piping a script of commands to it through standard input.

MS-DOS actually did contain another visual editor: GW-BASIC, Microsoft BASIC's interpreter and development environment. Unsurprisingly, the EDIT editor in MS-DOS versions 5.0 till 6.22 actually invoked QBasic, which over time replaced GW-BASIC and had a more modern user interface.

Edlin is probably modelled after the line editors QED or ed.

Edlin was created by Tim Paterson in two weeks in 1980, and was expected to have a six-month shelf life. [1]. Edlin was actually originally written for Seattle Computer Products's QDOS, which only later got bought by Microsoft in order to become MS-DOS.

Use of Microsoft's Edlin in today's environments is somewhat limited as it does not support long filenames. For example, attempting to edit an existing file named "longfilename.txt" results in Microsoft's Edlin creating a new file named "longfile.txt". This is related to limitations of the MS-DOS operating system prior to version 7.0 and not Microsoft's Edlin per se; long file names were added to MS-DOS and MS-Windows long after Microsoft's Edlin was written.

Gregory Pietsch has written a GPL'd clone of Edlin that includes long filename support. The clone is available for download as part of the FreeDOS project, and runs on operating systems such as Linux or Unix as well as MS-DOS. The clone's outputted messages can also be customized for a variety of European languages and can be compiled with a variety of C compilers.

Although generally useless in modern time, edlin sometimes may be used as edlin-script interpreter, in the environments where no other editors exist. Scripts may look like edlin command sequences and they may be run as:

edlin < script

Another such standard DOS tool is DEBUG.EXE.

[edit] External links