commands.sh

ed

all

The original Unix text editor. See also: `awk`, `sed`.

More info →

Options (5)

-p, --promptboolean

Start an interactive editor session with an empty document and a specific prompt

Example: ed {{[-p|--prompt]}} '{{> }}'
-v, --verboseboolean

Start an interactive editor session with user-friendly errors

Example: ed {{[-v|--verbose]}}
-q, --quietboolean

Start an interactive editor session with an empty document and without diagnostics, byte counts and '!' prompt

Example: ed {{[-q|--quiet]}} {{[-s|--script]}}
-s, --scriptboolean

Start an interactive editor session with an empty document and without diagnostics, byte counts and '!' prompt

Example: ed {{[-q|--quiet]}} {{[-s|--script]}}
-l, --loose-exit-statusboolean

Start an interactive editor session without exit status change when command fails

Example: ed {{[-l|--loose-exit-status]}}

Examples (8)

Start an interactive editor session with an empty document

Start an interactive editor session with an empty document and a specific prompt

ed [-p|--prompt] '> '

Start an interactive editor session with user-friendly errors

ed [-v|--verbose]

Start an interactive editor session with an empty document and without diagnostics, byte counts and '!' prompt

ed [-q|--quiet] [-s|--script]

Start an interactive editor session without exit status change when command fails

ed [-l|--loose-exit-status]

Edit a specific file (this shows the byte count of the loaded file)

ed path/to/file

[Interactive] Replace a string with a specific replacement for all lines

,s/regex/replacement/g

[Interactive] Exit `ed`

made by @shridhargupta | data from tldr-pages