help-gawk
[Top][All Lists]
Advanced

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

Re: Rule with starting { on next line


From: david kerns
Subject: Re: Rule with starting { on next line
Date: Sun, 9 Apr 2023 16:17:45 -0700

On Sun, Apr 9, 2023 at 3:50 PM uzibalqa via Help-gawk <help-gawk@gnu.org>
wrote:

>
> ------- Original Message -------
> On Monday, April 10th, 2023 at 8:12 AM, uzibalqa via Help-gawk <
> help-gawk@gnu.org> wrote:
>
>
> > I am doing the following, which is repeating "MATCH $0 BEG_ERE" for
> every line.
> > Primarily because the starting "{" starts on the next line. Would this
> be a bug?
> >
> > match($0, beg_ere, maggr)
> > {
> > print "MATCH $0 BEG_ERE"
> > print " " $0
> > next
> > }
>
> Have been looking through the manual.  But could not find some information
> about
> not having the opening "{" on the next line for
>
> pattern { action }
> BEGIN { action }
> END { action }
>
> Is your first post the complete program?
if it is, then "pattern" = "match($0, beg_ere, maggr)"
and "action" = "print "MATCH $0 BEG_ERE"; print " " $0; next"
without any other information, if it's printing "MATCH $0 BEG_ERE" for
every line, then the match is returning a "true" value for every line and
it's doing action... all successfully.


reply via email to

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