Debian Codegraph @

upstream/debian-unstable/man1/ed.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
2 .TH ED "1" "February 2026" "GNU ed 1.22.5" "User Commands"
3 .SH NAME
4 ed \- line-oriented text editor
5 .SH SYNOPSIS
6 .B ed
7 [\fI\,options\/\fR] [[\fI\,+line\/\fR] \fI\,file\/\fR]
8 .SH DESCRIPTION
9 GNU ed is a line\-oriented text editor. It is used to create, display,
10 modify and otherwise manipulate text files, both interactively and via
11 shell scripts. A restricted version of ed, red, can only edit files in
12 the current directory and cannot execute shell commands. Ed is the
13 \&'standard' text editor in the sense that it is the original editor for
14 Unix, and thus widely available. For most purposes, however, it is
15 superseded by full\-screen editors.
16 .PP
17 The file name may be preceded by '+line', '+/RE', or '+?RE' to set the
18 current line to the line number specified or to the first or last line
19 matching the regular expression 'RE'.
20 .PP
21 Start edit by reading in 'file' if given.
22 If 'file' begins with a '!', read output of shell command.
23 .PP
24 The environment variable LINES can be used to set the initial window size.
25 .SH OPTIONS
26 .TP
27 \fB\-h\fR, \fB\-\-help\fR
28 display this help and exit
29 .TP
30 \fB\-V\fR, \fB\-\-version\fR
31 output version information and exit
32 .TP
33 \fB\-E\fR, \fB\-\-extended\-regexp\fR
34 use extended regular expressions
35 .TP
36 \fB\-G\fR, \fB\-\-traditional\fR
37 run in compatibility mode
38 .TP
39 \fB\-l\fR, \fB\-\-loose\-exit\-status\fR
40 exit with 0 status even if a command fails
41 .TP
42 \fB\-p\fR, \fB\-\-prompt\fR=\fI\,STRING\/\fR
43 use STRING as an interactive prompt
44 .TP
45 \fB\-q\fR, \fB\-\-quiet\fR, \fB\-\-silent\fR
46 suppress diagnostics written to stderr
47 .TP
48 \fB\-r\fR, \fB\-\-restricted\fR
49 run in restricted mode
50 .TP
51 \fB\-s\fR, \fB\-\-script\fR
52 suppress byte counts and '!' prompt
53 .TP
54 \fB\-v\fR, \fB\-\-verbose\fR
55 be verbose; equivalent to the 'H' command
56 .TP
57 \fB\-\-strip\-trailing\-cr\fR
58 strip carriage returns at end of text lines
59 .TP
60 \fB\-\-unsafe\-names\fR
61 allow control characters in file names
62 .SH "EXIT STATUS"
63 0 for a normal exit, 1 for environmental problems (invalid command\-line
64 options, memory exhausted, command failed, etc), 2 for problems with the
65 input file (file not found, buffer modified, I/O errors), 3 for an internal
66 consistency error (e.g., bug) which caused ed to panic.
67 .SH "REPORTING BUGS"
68 Report bugs to bug\[email protected]
69 .br
70 Ed home page: http://www.gnu.org/software/ed/ed.html
71 .br
72 General help using GNU software: http://www.gnu.org/gethelp
73 .SH COPYRIGHT
74 Copyright \(co 1994 Andrew L. Moore.
75 .br
76 Copyright \(co 2026 Antonio Diaz Diaz.
77 License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
78 .br
79 This is free software: you are free to change and redistribute it.
80 There is NO WARRANTY, to the extent permitted by law.
81 .SH "SEE ALSO"
82 The full documentation for
83 .B ed
84 is maintained as a Texinfo manual. If the
85 .B info
86 and
87 .B ed
88 programs are properly installed at your site, the command
89 .IP
90 .B info ed
91 .PP
92 should give you access to the complete manual.