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

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

Re: [gawk] Change in the order of precedence for the redirection operato


From: Stepan Kasal
Subject: Re: [gawk] Change in the order of precedence for the redirection operator?
Date: Wed, 26 Oct 2005 08:53:48 +0200
User-agent: Mutt/1.4.1i

Hello,

On Tue, Oct 25, 2005 at 03:16:50AM -0700, Tony Leneis wrote:
> 
> gawk 'BEGIN { "echo " "date" | getline;  print }'
...
>       According to the gawk documentation, it looks like 3.0.3, 3.1.0
> and 3.1.1 have it right but gawk 3.1.4 and 3.1.5 seems to have increased
> the precedence of the | redirection operator.

thank you for your bug report.
Let me provide a quick answer, before the maintainer gets to it.

I believe there were good reasons for the change, but I don't have time
to dig it out right now.  Anyway, the precedence of concatenation is
difficult to get right, especially with respect to redirection, and the
gawk manual warns you about it, in node "Concatenation".

In the POSIX specification of awk, the precedence table doesn't contain
"redirection", it is described in the text.  And there is a big warning
that mixing redirection with non-trivial expressions might be ambiguous,
thus conforming awk scripts have to prenthesize.

HTH,
        Stepan Kasal




reply via email to

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