aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawktexi.in
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-06-12 20:26:33 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-06-12 20:26:33 +0300
commita279891d608390b651563b1083fa60d903052225 (patch)
tree52d4f4f5c5e8b0dbc040bb8ea9c762b2c6fcdbb4 /doc/gawktexi.in
parent002c1fea9a83ec2d4abca4a84c7eeeee41bc219c (diff)
parent290cf9254679b911f32d558db04147cf6fa20b24 (diff)
downloadegawk-a279891d608390b651563b1083fa60d903052225.tar.gz
egawk-a279891d608390b651563b1083fa60d903052225.tar.bz2
egawk-a279891d608390b651563b1083fa60d903052225.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r--doc/gawktexi.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index e6a44248..5dcf20a1 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -6244,6 +6244,12 @@ Another predefined variable, @code{NR}, records the total number of input
records read so far from all @value{DF}s. It starts at zero, but is
never automatically reset to zero.
+Normally, records are separated by newline characters. You can control how
+records are separated by assigning values to the built-in variable @code{RS}.
+If @code{RS} is any single character, that character separates records.
+Otherwise (in @command{gawk}), @code{RS} is treated as a regular expression.
+This mechanism is explained in greater detail shortly.
+
@menu
* awk split records:: How standard @command{awk} splits records.
* gawk split records:: How @command{gawk} splits records.
@@ -6430,9 +6436,9 @@ sets the variable @code{RT} to the text in the input that matched
@cindex common extensions, @code{RS} as a regexp
@cindex extensions, common@comma{} @code{RS} as a regexp
-When using @command{gawk},
-the value of @code{RS} is not limited to a one-character
-string. It can be any regular expression
+When using @command{gawk}, the value of @code{RS} is not limited to a
+one-character string. If it contains more than one character, it is
+treated as a regular expression
(@pxref{Regexp}). @value{COMMONEXT}
In general, each record
ends at the next string that matches the regular expression; the next