UNIX ed editor.

Using the ed editor on Linux.


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 w and q 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.

Comments

Popular Posts