diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/sed-in.texi | 15 | ||||
-rw-r--r-- | doc/sed.1 | 10 | ||||
-rw-r--r-- | doc/sed.texi | 17 | ||||
-rw-r--r-- | doc/sed.x | 5 |
4 files changed, 36 insertions, 11 deletions
diff --git a/doc/sed-in.texi b/doc/sed-in.texi index 40ba70b..1ed602f 100644 --- a/doc/sed-in.texi +++ b/doc/sed-in.texi @@ -318,8 +318,10 @@ follow the link and edit the ultimate destination of the link. The default behavior is to break the symbolic link, so that the link destination will not be modified. -@item -r +@item -E +@itemx -r @itemx --regexp-extended +@opindex -E @opindex -r @opindex --regexp-extended @cindex Extended regular expressions, choosing @@ -327,8 +329,15 @@ so that the link destination will not be modified. Use extended regular expressions rather than basic regular expressions. Extended regexps are those that @command{egrep} accepts; they can be clearer because they -usually have less backslashes, but are a @acronym{GNU} extension -and hence scripts that use them are not portable. +usually have fewer backslashes. +Historically this was a @acronym{GNU} extension, +but the @option{-E} +extension has since been added to the POSIX standard +(http://austingroupbugs.net/view.php?id=528), +so use @option{-E} for portability. +GNU sed has accepted @option{-E} as an undocumented option for years, +and *BSD seds have accepted @option{-E} for years as well, +but scripts that use @option{-E} might not port to other older systems. @xref{Extended regexps, , Extended regular expressions}. @ifset PERL @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH SED "1" "February 2013" "sed 4.2.2" "User Commands" +.TH SED "1" "October 2013" "sed 4.2.2" "User Commands" .SH NAME sed \- stream editor for filtering and transforming text .SH SYNOPSIS @@ -48,9 +48,10 @@ specify the desired line-wrap length for the `l' command .IP disable all GNU extensions. .HP -\fB\-r\fR, \fB\-\-regexp\-extended\fR +\fB\-E\fR, \fB\-r\fR, \fB\-\-regexp\-extended\fR .IP -use extended regular expressions in the script. +use extended regular expressions in the script +(for portability use POSIX \fB\-E\fR). .HP \fB\-s\fR, \fB\-\-separate\fR .IP @@ -367,6 +368,9 @@ and similarly for .BR \ea , .BR \et , and other sequences. +The \fI-E\fP option switches to using extended regular expressions instead; +the -E option has been supported for years by GNU sed, and is now +included in POSIX. .SH BUGS .PP E-mail bug reports to diff --git a/doc/sed.texi b/doc/sed.texi index 2bee542..a86ac6d 100644 --- a/doc/sed.texi +++ b/doc/sed.texi @@ -319,8 +319,10 @@ follow the link and edit the ultimate destination of the link. The default behavior is to break the symbolic link, so that the link destination will not be modified. -@item -r +@item -E +@itemx -r @itemx --regexp-extended +@opindex -E @opindex -r @opindex --regexp-extended @cindex Extended regular expressions, choosing @@ -328,8 +330,15 @@ so that the link destination will not be modified. Use extended regular expressions rather than basic regular expressions. Extended regexps are those that @command{egrep} accepts; they can be clearer because they -usually have less backslashes, but are a @acronym{GNU} extension -and hence scripts that use them are not portable. +usually have fewer backslashes. +Historically this was a @acronym{GNU} extension, +but the @option{-E} +extension has since been added to the POSIX standard +(http://austingroupbugs.net/view.php?id=528), +so use @option{-E} for portability. +GNU sed has accepted @option{-E} as an undocumented option for years, +and *BSD seds have accepted @option{-E} for years as well, +but scripts that use @option{-E} might not port to other older systems. @xref{Extended regexps, , Extended regular expressions}. @ifset PERL @@ -814,7 +823,7 @@ operators. @item \@var{digit} Matches the @var{digit}-th @code{\(@dots{}\)} parenthesized subexpression in the regular expression. This is called a @dfn{back -reference}. Subexpressions are implicitly numbered by counting +reference}. Subexpressions are implicity numbered by counting occurrences of @code{\(} left-to-right. @item \n @@ -4,7 +4,7 @@ sed \- a Stream EDitor .nf sed [-V] [--version] [--help] [-n] [--quiet] [--silent] [-l N] [--line-length=N] [-u] [--unbuffered] - [-r] [--regexp-extended] + [-E] [-r] [--regexp-extended] [-e script] [--expression=script] [-f script-file] [--file=script-file] [script-if-no-other-script] @@ -312,6 +312,9 @@ and similarly for .BR \ea , .BR \et , and other sequences. +The \fI-E\fP option switches to using extended regular expressions instead; +the -E option has been supported for years by GNU sed, and is now +included in POSIX. [SEE ALSO] .BR awk (1), |