bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gawk option processing


From: Stepan Kasal
Subject: Re: gawk option processing
Date: Tue, 21 May 2002 09:20:46 +0200
User-agent: Mutt/1.2.5.1i

Hallo,

On Mon, May 20, 2002 at 10:35:45AM -0700, Paul Eggert wrote:
> > From: Stepan Kasal <address@hidden>
> > the following two should also be:
> >     $ awk --traditional -F\t 'BEGIN{$0="atc\tha";print $2}'
> >     ha
> >     $ awk -F\t --traditional 'BEGIN{$0="atc\tha";print $2}'
> >     c       ha
> > But, as you see, they are not.
> 
> Thanks for sending in that bug report.  I'd like to second the motion
> that the order of options should not matter, as POSIX requires this
> behavior (for the POSIX options anyway) -- it's part of the Utility
> Syntax Guidelines.  It's a good idea for this rule to apply to all
> options, not just the POSIX-required ones.

well, the rule generally holds, as shown above.  But there are obvious
exceptions, at least with gawk, since -v and -F options are in fact bits
of program, not options (not speaking about -f options which are in fact
include directives).

But the bug report was purely artificial, resulting from detiled reading
of the code, not from user experience.  (Everyone using --traditional -Ft
instead of 'BEGIN{FS="\t"}' is strange.)  The purpose of the bug report
was to demonstrate that the old implementation strategy is too fragile.

Regards,
        Stepan Kasal



reply via email to

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