.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. .TH ED "1" "February 2024" "GNU ed 1.20.1" "User Commands" .SH NAME ed \- line-oriented text editor .SH SYNOPSIS .B ed [\fI\,options\/\fR] [[\fI\,+line\/\fR] \fI\,file\/\fR] .SH DESCRIPTION GNU ed is a line\-oriented text editor. It is used to create, display, modify and otherwise manipulate text files, both interactively and via shell scripts. A restricted version of ed, red, can only edit files in the current directory and cannot execute shell commands. Ed is the \&'standard' text editor in the sense that it is the original editor for Unix, and thus widely available. For most purposes, however, it is superseded by full\-screen editors such as GNU Emacs or GNU Moe. .PP 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'. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR display this help and exit .TP \fB\-V\fR, \fB\-\-version\fR output version information and exit .TP \fB\-E\fR, \fB\-\-extended\-regexp\fR use extended regular expressions .TP \fB\-G\fR, \fB\-\-traditional\fR run in compatibility mode .TP \fB\-l\fR, \fB\-\-loose\-exit\-status\fR exit with 0 status even if a command fails .TP \fB\-p\fR, \fB\-\-prompt\fR=\fI\,STRING\/\fR use STRING as an interactive prompt .TP \fB\-q\fR, \fB\-\-quiet\fR, \fB\-\-silent\fR suppress diagnostics written to stderr .TP \fB\-r\fR, \fB\-\-restricted\fR run in restricted mode .TP \fB\-s\fR, \fB\-\-script\fR suppress byte counts and '!' prompt .TP \fB\-v\fR, \fB\-\-verbose\fR be verbose; equivalent to the 'H' command .TP \fB\-\-strip\-trailing\-cr\fR strip carriage returns at end of text lines .TP \fB\-\-unsafe\-names\fR allow control characters 1\-31 in file names .PP Start edit by reading in 'file' if given. If 'file' begins with a '!', read output of shell command. .PP Exit status: 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. .SH "REPORTING BUGS" Report bugs to bug\-ed@gnu.org .br Ed home page: http://www.gnu.org/software/ed/ed.html .br General help using GNU software: http://www.gnu.org/gethelp .SH COPYRIGHT Copyright \(co 1994 Andrew L. Moore. .br Copyright \(co 2024 Antonio Diaz Diaz. License GPLv2+: GNU GPL version 2 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" The full documentation for .B ed is maintained as a Texinfo manual. If the .B info and .B ed programs are properly installed at your site, the command .IP .B info ed .PP should give you access to the complete manual.