shithub: riscv

Download patch

ref: eadeb86f5132ca1cd5595179fe5a503ec69dca4a
parent: 7a4e46d7abb4d1cd95bbe2143e0b42c76568e505
author: aiju <[email protected]>
date: Fri Jun 3 09:27:04 EDT 2011

fixed issue #29

--- a/sys/man/1/awk
+++ b/sys/man/1/awk
@@ -243,6 +243,13 @@
 .SM UTF
 string
 .TP
+.BI substr( s , " m")
+the maximum length substring of
+.I s
+that begins at position
+.IR m
+counted from 1.
+.TP
 .BI substr( s , " m" , " n\fL)
 the
 .IR n -character
@@ -303,6 +310,10 @@
 is not given,
 .B $0
 is used.
+.B &
+in
+.I t
+is replaced by the match.
 .TP
 .B gsub
 same as
--- a/sys/man/1/sed
+++ b/sys/man/1/sed
@@ -255,6 +255,30 @@
 if a replacement
 was made.
 .RE
+.IP
+An ampersand 
+.L &
+appearing in the replacement
+is replaced by the string matching the regular expression.
+The characters
+.BI \e n\f1,
+where
+.I n
+is a digit,
+are replaced by the text matched by the
+.IR n -th
+regular subexpression
+enclosed between
+.L (
+and
+.LR ) .
+When
+nested parenthesized subexpressions
+are present,
+.I n
+is determined by counting occurrences of
+.L (
+starting from the left.
 .TP
 .BI t " label"
 Test.