|
From: | arnold |
Subject: | Re: -F fs_val handles backslash-newline differently, compared to -v FS=val and FS=val |
Date: | Thu, 08 Jun 2023 08:43:57 -0600 |
User-agent: | Heirloom mailx 12.5 7/5/10 |
That is an interesting report. I will (eventually) investigate; I don't have a lot of free time at the moment. Thanks, Arnold Denys Vlasenko <dvlasenk@redhat.com> wrote: > GNU awk 5.1.1 > > gawk -F '\ > a' 'BEGIN { print "FS1=" FS }' > > gawk -v FS='\ > a' 'BEGIN { print "FS2=" FS }' > > echo | gawk '{ print "FS3=" FS }' FS='\ > a' > > The first command treats "backslash+newline" as backslash: > > FS1=\a > > The second and third commands treat the same as empty string: > > FS2=a > FS3=a > > I think it would be better if all forms have the same rules. >
[Prev in Thread] | Current Thread | [Next in Thread] |