Мануалы и справочники Общие команды

Команда ed: опции, ключи и примеры использования


The original Unix text editor.

  • Start ed, editing an empty document (which can be saved as a new file in the current directory):


  • Start ed, editing an empty document, with : as a command prompt indicator:

ed -p :

  • Start ed editing an existing file (this shows the byte count of the loaded file):

ed -p : {{path/to/file}}

  • Toggle the printing of error explanations. (By default, explanations are not printed and only a ? appears):


  • Add text to the current document. Mark completion by entering a period by itself in a new line:


  • Print the entire document (, is a shortcut to the range 1,$ which covers the start to the end of the document):


  • Write the current document to a new file (the filename can be omitted if ed was called with an existing file):

w {{filename}}

  • Quit ed:


Изображение Выучи 10 хороших привычек для работы в UNIX от IBM