bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Gawk Handles Late-In-Command-Line -v Variable Assignments


From: arnold
Subject: Re: [bug-gawk] Gawk Handles Late-In-Command-Line -v Variable Assignments Differently When -e and -f Are Omitted
Date: Fri, 19 Apr 2019 04:17:11 -0600
User-agent: Heirloom mailx 12.5 7/5/10

It's been a while since I looked at that part of the manual.
I will review it.

Thanks,

Arnold

"Neil R. Ormos" <address@hidden> wrote:

> address@hidden wrote:
>
> > > I don't mean to be obtuse, but why are the '-v'
> > > and 'a=99' arguments placed in ARGV[] only when
> > > the program source is furnished without -f, -e or
> > > --source= ?
>
> > The way awk has always worked is that the program is the first non-option
> > argument on the command line (and there are no -f / -e options).
> > And then everything following the program text is then placed in ARGV.
>
> > Essentially, awk stops parsing the command line for its own options once
> > it finds that the program is specified on the command line.
>
> Thank you.
>
> The manual is clear that when no -f or -e options
> are present, the first non-option argument on the
> command line is used as the program.
>
> I did not see an indication in the manual that
> first non-option argument (whether it's the program
> text or not) terminates option processing.
> (Maybe I just missed that.  (And maybe I should have
> inferred the behavior from the presence of "-v" in
> ARGV[].))
>
> Wishing you a happy holiday!
>
> --Neil Ormos



reply via email to

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