bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Assigning RegExp Variables on the Command Line


From: arnold
Subject: Re: [bug-gawk] Assigning RegExp Variables on the Command Line
Date: Sun, 06 Oct 2019 12:06:13 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Fix is in and pushed.

Thanks,

Arnold

address@hidden wrote:

> Hi.
>
> Thanks for the report. You are correct. I will fix this.
>
> Thanks,
>
> Arnold
>
> Marcus <address@hidden> wrote:
>
> > Hello! I suppose there's a misprint in the manual dealing with assigning 
> > regexp variables on the command line (v 5.1.0, sec. 6.1.3.2).
> >
> > gawk -v ’re1=foo|bar/’ ’...’ /path/to/file1 ’re2=baz|quux/’ /path/to/file2
> >
> > If I run it "as is", I'll get:
> >
> > $ /path/to/gawk -v 're1=foo|bar/' 'BEGIN { print typeof(re1); print re1; 
> > exit }'
> > string
> > foo|bar/
> > $
> >
> > This version works for me:
> >
> > $ /path/to/gawk -v 're1=@/foo|bar/' 'BEGIN { print typeof(re1); print re1; 
> > exit }'
> > regexp
> > foo|bar
> > $
> >
> > _______________
> >
> > Yours respectfully,
> > Mark Krauze
> >
> > P.S. Dear recipients! If you read this, YES, this is my new e-mail address.
> >
> >
>



reply via email to

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