ed
TLDR
Start ed with file
SYNOPSIS
ed [options] [file]
DESCRIPTION
ed is the standard Unix line editor. It operates in command mode by default, accepting single-letter commands to navigate, view, and modify text. It's the ancestor of sed and vi.
Commands typically consist of an address or range followed by a command letter. Addresses can be line numbers, patterns, or special characters (. for current, $ for last line).
ed is useful for scripted editing, as commands can be piped to it. Its minimal interface makes it valuable for emergency system recovery when full-screen editors aren't available.
PARAMETERS
FILE
File to edit.-p STRING
Set command prompt.-s
Suppress diagnostics.-G
Enable backwards compatibility.
CAVEATS
No visual feedback by default. Errors reported with "?" unless verbose. Learning curve for command syntax. Not suitable for casual editing.
HISTORY
ed was written by Ken Thompson at Bell Labs in 1969, making it one of the earliest Unix programs. Its design influenced sed, ex, vi, and ultimately modern text editors.


