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 with0status even if a command fails. she's being chill about it ๐-p,--prompt=STRINGโ useSTRINGas 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 theHcommand.--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:
0for a normal exit ๐1for environmental problems (invalid command-line options, memory exhausted, command failed, etc)2for problems with the input file (file not found, buffer modified, I/O errors)3for an internal consistency error (e.g., bug) which caused ed to panic ๐ญ
๐ REPORTING BUGS ๐
Found a bug? Tell the girlies:
- Report bugs to
bug-ed@gnu.org - Ed home page:
http://www.gnu.org/software/ed/ed.html - General help using GNU software:
http://www.gnu.org/gethelp
๐ COPYRIGHT ๐
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
- arch rolling: ed 1.22.6-1 ยท GPL-2.0-only
- nixpkgs unstable: ed 1.22.6
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms