[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] syntax error when setting RS via string concatenation
From: |
arnold |
Subject: |
Re: [bug-gawk] syntax error when setting RS via string concatenation |
Date: |
Mon, 09 May 2016 11:46:52 -0600 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
Ed Morton <address@hidden> wrote:
> > There is no way for gawk to
> > know that it should ignore RS because you plan to fix it later.
>
> Sure there is, just ignore its value until it's used.
It could be done that way, but it isn't done that way now, and I
have no intention of changing it. mawk also fails:
$ mawk 'BEGIN { RS = "[x" }'
mawk: run time error: regular expression compile failed (bad class -- [], [^]
or [)
[x
FILENAME="" FNR=0 NR=0
The lesson is to set RS with a valid regexp.
Arnold