Edlin
Encyclopedia
Edlin is a line editor
Line editor
A line editor is a text editor computer program that manipulates text primarily by the display, modification, and movement of lines. Line editors precede screen-based text editors and originated in an era when a computer operator typically interacted with a teleprinter , with no video display, and...

 included with MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 and later Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 operating systems. It provides rudimentary capabilities for editing plain text
Plain text
In computing, plain text is the contents of an ordinary sequential file readable as textual material without much processing, usually opposed to formatted 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
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

 provided with MS-DOS before version 5.0 of that system, when it was superseded by the full screen MS-DOS Editor. It was removed in version 6. However, Edlin is included in 32-bit versions of Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

, since NTVDM
Virtual DOS machine
Virtual DOS machine is Microsoft's technology that allows running legacy DOS and 16-bit Windows programs on Intel 80386 or higher computers when there is already another operating system running and controlling the hardware.-Overview:...

's DOS support is based on MS-DOS version 5.0. Unlike most other external DOS commands, it has not been transformed into a native Win32
Windows API
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces available in the Microsoft Windows operating systems. It was formerly called the Win32 API; however, the name "Windows API" more accurately reflects its roots in 16-bit Windows and its support on...

 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.

Edlin was created by Tim Paterson
Tim Paterson
Tim Paterson is an American computer programmer, best known as the original author of MS-DOS, the most widely used personal computer operating system in the 1980s....

 in two weeks in 1980, and was expected to have a six-month shelf life. It was originally written for Seattle Computer Products
Seattle Computer Products
Seattle Computer Products was a Seattle, Washington microcomputer hardware company which was one of the first manufacturers of computer systems based on the 16-bit Intel 8086 processor...

's 86-DOS (QDOS), which Microsoft acquired and sold as MS-DOS.

Usage

Although seldom used in modern times, Edlin may sometimes be used as an Edlin-script interpreter, in environments where no other editors exist. Scripts may look like Edlin command sequences and they may be run as:


edlin < script


There are only a handful of commands available. The short list can be found by entering a ? at the edlin prompt, which yields the following:

*?
Edit line line#
Append [#lines]A
Copy [startline],[endline],toline[,times]C
Delete [startline][,endline]D
End (save file) E
Insert [line]I
List [startline][,endline]L
Move [startline],[endline],tolineM
Page [startline][,endline]P
Quit (throw away changes) Q
Replace [startline][,endline][?]R[oldtext][CTRL+Znewtext]
Search [startline][,endline][?]Stext
Transfer [toline]T[drive:][path]filename
Write [#lines]W
*

When a file is open, type L to list the contents. E.g.: 1,6L to view lines 1 through 6. Each line will be displayed with a line number in front of it.

*1,6L
1: Edlin: The only text editor in early versions of DOS.
2:
3: Back in the day, I remember seeing web pages
4: branded with a logo at the bottom:
5: "This page created in edlin."
6: The things that some people put themselves through. ;-)
*

The currently selected line will have a *. To replace the contents of any line, enter the line number. To cancel any changes while editing a line press Ctrl-C. The * marker will remain on that line.

Entering I (optionally preceded with a line number) will insert one or more lines before the * line or the line given. When finished entering lines, Ctrl-C will return to the edlin command prompt.

*6I
6:*(or something like that)
7:*^C
 
*7D
*L
1: Edlin: The only text editor in early versions of DOS.
2:
3: Back in the day, I remember seeing web pages
4: branded with a logo at the bottom:
5: "This page created in edlin."
6: (or something like that)
*

D will delete the specified line, again optionally starting with the number of a line, or a range of lines. E.g.: 2,4d will delete lines 2 through 4. In the above example, line 7 was deleted. This is probably a poor example, as the line could have simply been replaced by entering a 6, then replacing the old line 6.

R is used to replace all occurrences of a piece of text in a given range of lines, for example, to replace a spelling error. Including the ? will prompt you for each change. E.g.: To replace 'prit' with 'print' and to prompt for each change, enter ?rprit^Zprint (the ^Z represents pressing CTRL-Z). It is case-sensitive.

S will search for given text. It is used in the same way as replace, but without the replacement text. A search for 'apple' in the first 20 lines of a file, would be typed 1,20?sapple (no space, unless that is part of the search) and press enter. For each match, it will ask if it the correct one, and accept n or y (or Enter).

P displays listing of range of lines. If no range is specified. P will display the complete file from the * to the end. This is different from L in that P changes the current line to be the last line in the range.

T is used to transfer another file into the one being edited, with this syntax: [line to insert at]t[full path to file].

To save the file, type W (write). To save and quit, type E (end). To exit without saving, type Q (quit).

Long filenames support

Use of Edlin in today's environments is somewhat limited as it does not support long filename
Long filename
Long filenames , are Microsoft's way of implementing filenames longer than the 8.3 filename, or short-filename, naming scheme used in Microsoft DOS in their modern FAT and NTFS filesystems. Because these filenames can be longer than an 8.3 filename, they can be more descriptive...

s. For example, attempting to edit an existing file named "longfilename.txt" results in 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 Edlin per se; long file names were added to MS-DOS and MS-Windows long after Edlin was written.

FreeDOS Edlin

Gregory Pietsch has written a GPL
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

-licenced clone
Clone (computer science)
In computing, a clone is a hardware or software system that is designed to mimic another system. Compatibility with the original system is usually the explicit purpose of cloning hardware or low-level software such as operating systems...

 of Edlin that includes long filename support. The clone is available for download as part of the FreeDOS
FreeDOS
FreeDOS is an operating system for IBM PC compatible computers. FreeDOS is made up of many different, separate programs that act as "packages" to the overall FreeDOS Project...

 project, and runs on operating systems such as Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 or Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 as well as MS-DOS. The clone's outputted messages can also be customized for a variety of European languages or Japanese and can be compiled with a variety of C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

compilers.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK