Issue Type: | Bug |
---|---|
Priority: | 4 - Normal |
Status: | Resolved |
Created at: | 2018-10-20T01:04:49.807Z |
Updated at: | 2019-06-17T21:24:03.884Z |
Created by: | Former user |
---|---|
Reported by: | Former user |
Assigned to: | Former user |
Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2019-06-13T18:58:43.397Z)
2019-06-20 Urban Fervor (Release Date: 2019-06-20)
When processing input, gawk(1)
will set the variable RT
to the value used to terminate the record. While this will normally just be the same as RS
, it is useful to have when processing files that may not end with the record separator value (usually a newline). For example, the following program would always produce a trailing newline into its output:
% nawk '{ print $0; }' file
Whereas this one would only add it if it were there in the input:
% nawk '{ printf("%s%s", $0, RT); }' file
To test these changes, I wrote a new test file, T.rt
, and made sure that all of the new tests passed with both nawk
and gawk
.
illumos-joyent commit 2b2695541d621ef1caa51056d6407f0acd012ed6 (branch master, by Cody Peter Mello)
OS-7316 Want support for RT (record terminator) variable in nawk(1)
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Jason King <jbk@joyent.com>