Using the UNIX ed editor. The simplest line editor for writing text files.

Posted: February 2, 2012. At: 10:16 PM. This was 6 years ago. Post ID: 2609
Page permalink: http://securitronlinux.com/uncategorized/using-the-unix-ed-editor-the-simplest-line-editor-for-writing-text-files/

Now, we must convince Congress to stop the FCC. Can you display an alert?

The ed(1) line editor is a very useful editor for text files on Linux and it is very simple to use. type ed to start it then to add text to an existing text file, type e my.txt. Then a to append text onto the text file.

[13:20:35-*-homer@hungry-forest Desktop]$ ed
e my.txt
1449
a

Then type away, once you have typed your text, hit CTRL-C to get back to command mode and exit the editor and save the file by pressing w and q to save and exit ed as shown below.

[13:24:17-*-homer@hungry-forest Desktop]$ ed
e my.txt
Newline appended
1793
a
save the file by pressing <b>w</b> and <b>q</b> to save and exit ed.^C
?
w
1793
q
[13:25:31-*-homer@hungry-forest Desktop]$

This is very simple to do and this editor is very fast and easy to use once you get the hang of it. Once you have used ed(1) you will not want to go back to the older style of editors like Leafpad or Gedit. Who needs those types of editors when you can just use the old UNIX line editors and have nothing in your way like spell-checkers or ribbon toolbars.

No comments have been made. Use this form to start the conversation :)

Leave a Reply