Ed
The text editor ed was the original standard on the UNIX operating system. ed was originally written by Ken Thompson and he implemented regular expression in ed for the first time. Prior to that implementation, the concept of regular expressions was only formalized in a mathematical paper, which Ken Thompson had read. ed was influenced by an earlier editor known as QED from University of California at Berkeley, where Ken Thompson had graduated from. ed went on to influence ex, which in turn spawned vi. The non-interactive UNIX commands grep and sed were inspired by common special uses of ed; their influence is visible in the design of the programming language AWK, which in turn inspired aspects of Perl.
Example session
Here is an example transcript of an ed session:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
a
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
ed is the standard UNIX text editor.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
This is line number two.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
2i
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
1,$l
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
ed is the standard UNIX text editor.$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
This is line number two.$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
3s/two/three/
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
1,$l
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
ed is the standard UNIX text editor.$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
This is line number three.$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
w text
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
65
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
q
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
The end result is a simple text file containing the following text:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
ed is the standard UNIX text editor.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
This is line number three.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Table of Content ~
| ► | Introduction |
| ► | Example session |
| ► | Explanation of the example |
| ► | Bill Joy, vi, and ed |
| ► | External links |
~ What's Hot ~
~ Community ~
| ► | History Forum Come and discuss about History, Civilizations, Historical Events and Figures |
| ► | History Web-Ring A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site. |
and are licensed under the GNU Free Documentation License.
Lexicon - Privacy Policy - Spiritus-Temporis.com ©2005.
