Professional Documents
Culture Documents
Ed Editor in Linux: Subject - Syspro
Ed Editor in Linux: Subject - Syspro
SUBJECT - SYSPRO
DEFINITION
The ed text editor was one of the first three key elements of the Unix operating
system—assembler, editor, and shell—developed by Ken Thompson in August
1969 on a PDP-7 at AT&T Bell Labs. Many features of ed came from the qed text
editor developed at Thompson's alma mater University of California.
Berkeley Thompson was very familiar with qed, and had reimplemented it on
the CTSS and Multics systems. Thompson's versions of qed were notable as the
first to implement regular expressions. Regular expressions are also implemented
in ed, though their implementation is considerably less general than that in qed.
WHY LEARN ED EDITOR
The simplest way to start the text editor is by typing “ed” into the terminal.
EXAMPLE 1
EXAMPLE 2
To enter into the insert mode press “a” and when you are done writing stop it by
“.”(dot).
Example 3: To view, the last line enter “p” into the ed command prompt.
Example 4: To print all the lines that we inserted in the buffer by using “, p”.
Example 5: To save these lines into a file write “f [filename]”.
Example 6: The file now has data and we can exit to the terminal by pressing “Q”
at ed command prompt.
CONCLUSION
Agreed, ed isn't user-friendly, but that's a limitation only if you compare it with
what all alternatives are available today. So, it's safe to say that this editor is not
for all. However, if you are on a setup where you need to use a line-editor, this
tutorial should give a good head start. For more information, head to the
tool's man page, or read the GNU manual.