From 19bebf51939d4c24d261c5720b3e54333d441fa6 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Wed, 22 Mar 2017 20:26:03 -0400 Subject: Start to document new FIELDWIDTHS and API input parser capabilities. --- doc/gawk.1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'doc/gawk.1') diff --git a/doc/gawk.1 b/doc/gawk.1 index 2460a686..f135e955 100644 --- a/doc/gawk.1 +++ b/doc/gawk.1 @@ -805,10 +805,13 @@ is a regular expression. .PP If the .B FIELDWIDTHS -variable is set to a space separated list of numbers, each field is +variable is set to a space-separated list of numbers, each field is expected to have fixed width, and .I gawk -splits up the record using the specified widths. The value of +splits up the record using the specified widths. +Each field width may optionally be preceded by a colon-separated +value specifying the number of characters to skip before the field starts. +The value of .B FS is ignored. Assigning a new value to @@ -959,12 +962,14 @@ For non-system errors, will be zero. .TP .B FIELDWIDTHS -A whitespace separated list of field widths. When set, +A whitespace-separated list of field widths. When set, .I gawk parses the input into fields of fixed width, instead of using the value of the .B FS variable as the field separator. +Each field width may optionally be preceded by a colon-separated +value specifying the number of characters to skip before the field starts. See .BR Fields , above. -- cgit v1.2.3 From 1bb38a7e6f81712d8ca8b59922abb176a735dd1f Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Wed, 22 Mar 2017 20:57:15 -0400 Subject: Update NEWS and doc/gawk.1 to document new PROCINFO["FS"] value "API". --- doc/gawk.1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/gawk.1') diff --git a/doc/gawk.1 b/doc/gawk.1 index f135e955..a4f691d6 100644 --- a/doc/gawk.1 +++ b/doc/gawk.1 @@ -1138,8 +1138,10 @@ is in effect, \fB"FPAT"\fP if field splitting with .B FPAT is in effect, -or \fB"FIELDWIDTHS"\fP if field splitting with +\fB"FIELDWIDTHS"\fP if field splitting with .B FIELDWIDTHS +is in effect, +or \fB"API"\fP if API input parser field splitting is in effect. .TP \fBPROCINFO["gid"]\fP -- cgit v1.2.3