{{stub}} 
{{language|Ed}}
This is the command language used by [[wp:ed_(software)]], 
the line oriented text editor, not to be confused with [[Sed]], the stream editor.

Implementations are [[GNU Ed]], [[Plan 9 Ed]], BSD ed, and original UNIX ed.
Ed is also a precursor to a whole family of other text editors and command languages.
Including [[Sed]], ex, vi, vim, sam, and others.

Ed scripts are usually ran as (on the example of [[GNU Ed]])
<syntaxhighlight lang="bash">
cat script.ed | ed -lEGs file.in
</syntaxhighlight>

Or, more portably, with Basic Regular Expressions on BSD, Mac, and [[GNU Ed]].
<syntaxhighlight lang="bash">
cat script.ed | ed -s file.in
</syntaxhighlight>

There's a convention of starting every ed script with capital H on a line of its own, to toggle more verbose error messages on. And optionally end the script with capital Q to force-quit without saving the changes to file.

A good reference for Ed is it's info page, which can be found online [https://linux.die.net/man/1/ed here].

Also see [[Tasks not implemented in Ed]]

[[Category:Editor]]
[[Category:Utility]]