diff options
Diffstat (limited to 'doc/sed.1')
-rw-r--r-- | doc/sed.1 | 87 |
1 files changed, 48 insertions, 39 deletions
@@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH SED "1" "June 2009" "sed version 4.2.1" "User Commands" +.TH SED "1" "December 2012" "sed 4.2.2" "User Commands" .SH NAME sed \- stream editor for filtering and transforming text .SH SYNOPSIS @@ -38,7 +38,7 @@ follow symlinks when processing in place .HP \fB\-i[SUFFIX]\fR, \fB\-\-in\-place\fR[=\fISUFFIX\fR] .IP -edit files in place (makes backup if extension supplied) +edit files in place (makes backup if SUFFIX supplied) .HP \fB\-l\fR N, \fB\-\-line\-length\fR=\fIN\fR .IP @@ -61,6 +61,10 @@ long stream. .IP load minimal amounts of data from the input files and flush the output buffers more often +.HP +\fB\-z\fR, \fB\-\-null\-data\fR +.IP +separate lines by NUL characters .TP \fB\-\-help\fR display this help and exit @@ -75,7 +79,7 @@ specified, then the standard input is read. .PP GNU sed home page: <http://www.gnu.org/software/sed/>. General help using GNU software: <http://www.gnu.org/gethelp/>. -E-mail bug reports to: <bug-gnu-utils@gnu.org>. +E-mail bug reports to: <bug-sed@gnu.org>. Be sure to include the word ``sed'' somewhere in the ``Subject:'' field. .SH "COMMAND SYNOPSIS" This is just a brief synopsis of \*(sd commands to serve as @@ -151,25 +155,6 @@ if .I label is omitted, branch to end of script. .TP -.RI t\ label -If a s/// has done a successful substitution since the -last input line was read and since the last t or T -command, then branch to -.IR label ; -if -.I label -is omitted, branch to end of script. -.TP -.RI T\ label -If no s/// has done a successful substitution since the -last input line was read and since the last t or T -command, then branch to -.IR label ; -if -.I label -is omitted, branch to end of script. This is a GNU -extension. -.TP c \e .TP .I text @@ -182,9 +167,10 @@ Delete pattern space. Start next cycle. .TP D -Delete up to the first embedded newline in the pattern space. -Start next cycle, but skip reading from the input -if there is still data in the pattern space. +If pattern space contains no newline, start a normal new cycle as if +the d command was issued. Otherwise, delete text in the pattern +space up to the first newline, and restart cycle with the resultant +pattern space, without reading a new line of input. .TP h H Copy/append pattern space to hold space. @@ -192,9 +178,6 @@ Copy/append pattern space to hold space. g G Copy/append hold space to pattern space. .TP -x -Exchange the contents of the hold and pattern spaces. -.TP l List out the current line in a ``visually unambiguous'' form. .TP @@ -229,6 +212,25 @@ and the special escapes \e1 through \e9 to refer to the corresponding matching sub-expressions in the .IR regexp . .TP +.RI t\ label +If a s/// has done a successful substitution since the +last input line was read and since the last t or T +command, then branch to +.IR label ; +if +.I label +is omitted, branch to end of script. +.TP +.RI T\ label +If no s/// has done a successful substitution since the +last input line was read and since the last t or T +command, then branch to +.IR label ; +if +.I label +is omitted, branch to end of script. This is a GNU +extension. +.TP .RI w\ filename Write the current pattern space to .IR filename . @@ -238,6 +240,9 @@ Write the first line of the current pattern space to .IR filename . This is a GNU extension. .TP +x +Exchange the contents of the hold and pattern spaces. +.TP .RI y/ source / dest / Transliterate the characters in the pattern space which appear in .I source @@ -284,7 +289,10 @@ The following address types are supported: .TP .I number Match only the specified line -.IR number . +.IR number +(which increments cumulatively across files, unless the +.B -s +option is specified on the command line). .TP .IR first ~ step Match every @@ -362,21 +370,22 @@ and other sequences. .SH BUGS .PP E-mail bug reports to -.BR bonzini@gnu.org . -Be sure to include the word ``sed'' somewhere in the ``Subject:'' field. +.BR bug-sed@gnu.org . Also, please include the output of ``sed --version'' in the body of your report if at all possible. -.SH COPYRIGHT -Copyright \(co 2009 Free Software Foundation, Inc. -.br -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, -to the extent permitted by law. -.PP +.SH AUTHOR +Written by Jay Fenlason, Tom Lord, Ken Pizzini, +and Paolo Bonzini. GNU sed home page: <http://www.gnu.org/software/sed/>. General help using GNU software: <http://www.gnu.org/gethelp/>. -E-mail bug reports to: <bug-gnu-utils@gnu.org>. +E-mail bug reports to: <bug-sed@gnu.org>. Be sure to include the word ``sed'' somewhere in the ``Subject:'' field. +.SH COPYRIGHT +Copyright \(co 2012 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. +.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" .BR awk (1), .BR ed (1), |