ED(1)

๐Ÿ’– ED(1) ๐Ÿ’– like, the original Unix line editor, bestie ๐ŸŽ€

okay so real talk โ€” ed is genuinely that girl, she's been here since forever, and your girl is about to explain her to you properly โœจ


๐ŸŒธ NAME ๐ŸŒธ

ed โ€” the line-oriented text editor. that's it, that's the vibe ๐Ÿ’…


โœจ SYNOPSIS โœจ

ed [options] [[+line] file]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

GNU ed is a line-oriented text editor, no cap. You use it to create, display, modify and otherwise manipulate text files โ€” both interactively and inside shell scripts. versatile queen ๐Ÿ‘‘

There's also a restricted version called red, and she's on a short leash: she can only edit files in the current directory and she absolutely cannot execute shell commands. boundaries, she has them ๐Ÿ™ˆ

Ed is the 'standard' text editor in the sense that she's the original editor for Unix, which means she's widely available basically everywhere โ€” like, you will never show up to a party and find out she wasn't invited ๐Ÿซถ. For most purposes, though, she's been superseded by full-screen editors. not her fault, she's an icon either way ๐Ÿ’€

The file name may be preceded by +line, +/RE, or +?RE to set the current line to the line number specified, or to the first or last line matching the regular expression RE โญ

Start edit by reading in file if given. And if file begins with a !, it reads the output of a shell command instead. plot twist ๐Ÿ˜ญ

The environment variable LINES can be used to set the initial window size.


๐Ÿ”ฅ OPTIONS ๐Ÿ”ฅ

  • -h, --help โ€” display this help and exit. cute, quick, done ๐Ÿ’–
  • -V, --version โ€” output version information and exit.
  • -E, --extended-regexp โ€” use extended regular expressions.
  • -G, --traditional โ€” run in compatibility mode.
  • -l, --loose-exit-status โ€” exit with 0 status even if a command fails. she's being chill about it ๐Ÿ’…
  • -p, --prompt=STRING โ€” use STRING as an interactive prompt.
  • -q, --quiet, --silent โ€” suppress diagnostics written to stderr.
  • -r, --restricted โ€” run in restricted mode.
  • -s, --script โ€” suppress byte counts and the ! prompt.
  • -v, --verbose โ€” be verbose; equivalent to the H command.
  • --strip-trailing-cr โ€” strip carriage returns at end of text lines.
  • --unsafe-names โ€” allow control characters in file names.

๐Ÿ‘‘ EXIT STATUS ๐Ÿ‘‘

okay so she exits with:

  • 0 for a normal exit ๐Ÿ’š
  • 1 for environmental problems (invalid command-line options, memory exhausted, command failed, etc)
  • 2 for problems with the input file (file not found, buffer modified, I/O errors)
  • 3 for an internal consistency error (e.g., bug) which caused ed to panic ๐Ÿ˜ญ

๐Ÿ› REPORTING BUGS ๐Ÿ›

Found a bug? Tell the girlies:


Copyright ยฉ 1994 Andrew L. Moore.

Copyright ยฉ 2026 Antonio Diaz Diaz. License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (say it with me: no warranty, no cap ๐Ÿซถ)


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

The full documentation for ed is maintained as a Texinfo manual. If the info and ed programs are properly installed at your site, the command

info ed

should give you access to the complete manual. go read it, iykyk ๐Ÿ“š


and that's the whole page bestie ๐Ÿ’œ โ€” brought to you by GNU ed 1.22.6, dated August 2026. slay, periodt, mwah ๐Ÿ’‹

๐Ÿ“ฆ where this page comes from