From fbc383882377ef0e0cbed5a0fdc468f300e9526f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 16 Sep 2016 20:25:38 -0700 Subject: doc: fs variable. * txr.1: Improve some wording in the description of the awk fs variable. --- txr.1 | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/txr.1 b/txr.1 index e0f0b17c..6f150245 100644 --- a/txr.1 +++ b/txr.1 @@ -37759,7 +37759,9 @@ variable is initially If .code fs -is nil, then, prior to field splitting, leading and trailing +is +.codn nil , +then, prior to field splitting, leading and trailing whitespace is trimmed from the value of .codn rec , using the @@ -37779,9 +37781,9 @@ is zero. If .code fs -is nil, then -In this special case, the splitting is performed using -the regular expression +is nil, then the splitting into fields is performed as if +the variable held the regular expression +.codn "/[\en\et ]+/" . This means that, by default, fields are separated by one or more consecutive whitespace characters, which can be any mixture of spaces, tabs or newlines. Newlines are included because they can occur in a record when the value of the @@ -37789,6 +37791,16 @@ record separator .code rs is customized. +If +.code fs +is not +.codn nil , +it must specify a string, or a regular expression. +A string value of +.code fs +denotes an exact match for that string; it isn't treated +as a regular expression. + When a record is not empty, matches for the .code fs @@ -37797,7 +37809,7 @@ the fields are the possibly empty non-matching parts between the matches. If .code fs -is not found in the record, then the entire record is taken as a single +is not found in the record, then the entire record is taken as a one field. If -- cgit v1.2.3