bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature request: only set RT when RS is found


From: Ole Petter R?nningen
Subject: feature request: only set RT when RS is found
Date: Wed, 15 Sep 2021 18:52:39 +0000

Hi

I am sure this has been discussed many times, yet my google-fu has failed to 
come up with some rationale.

As you know, gawk sets the variable RT to whatever matches RS, if RS is a 
regex. If EOF is reached mid-line and RS is therefore not matched, the record 
is terminated but RT is NOT set. This is a good way to detect possible "partial 
lines", for example when processing through a live log-file.

My proposal is that this behaviour is extended to include the case when RS is a 
single character such as '\n'. If RS is not found, it should IMHO not be 
signalled as found by setting RT.

Thank you,
Ole


reply via email to

[Prev in Thread] Current Thread [Next in Thread]