Previously, and in all other versions of awk I have ever encountered,
the following worked sensibly:
"date " "+%Z" | getline zone
That is, string concatenation has higher precedence than '|'.
In fact string concatentation
Now, for some very obscure reason (if any), the above has effectively
changed to:
"date " ("+%Z" | getline zone)
Ouch! This breaks so many scripts!
Worse still, the above statement doesn't even evaluate to anything
particularly sensible. In fact, it is quite meaningless.
Look to me as though some person has lamely used bitwise '|' operator
precendence rules and drawn a very wrong conclusion as to what '|'
means in the above context. It is esentially a string operation and
not an arithmetic one.
Please, can somebody fix this piece of stupidity?
Regards
John Witford
Please see this thread of discussion on this topic.
http://lists.gnu.org/archive/html/bug-gnu-utils/2005-10/msg00064.html
The thread was broken but continues here.
http://lists.gnu.org/archive/html/bug-gnu-utils/2005-10/msg00086.html
> Please, can somebody fix this piece of stupidity?
> ...other similar derisive remarks deleted...
Note that the tone of your message is not conducive to starting a
productive conversation with a developer. In the future you would be
well advised to remember the old saying, "You catch more flies with
honey than vineger."
Bob
Arnold
> Date: Mon, 28 Nov 2005 08:37:38 -0700
> From: b...@proulx.com (Bob Proulx)
> Subject: Re: Problem with changed 'pipe' precedence
> To: jw20...@loftmail.com
> Cc: bug-...@gnu.org
You may wish to use a different awk implementation, such as the Bell Labs
awk, or mawk. URLs for both are listed in the gawk documentation.
You may also wish to parenthesize your string concatenations when used
with getline. This will insure portability to all awk implementations.
Arnold Robbins
> Date: Wed, 30 Nov 2005 09:59:17 +1100
> From: jw20...@loftmail.com
> Subject: Re: Problem with changed 'pipe' precedence
> To: arn...@skeeve.com, b...@proulx.com
>
> For goodness me! Why don't you all grow up and start acting
> like adults instead of little wee hurt children.
>
> You didn't adequately test your changes and made a serious
> blunder, then you get all precious about it when somebody
> gets pissed off with the havoc the blunder caused.
>
> Last time the steering pinion in my car broke I also
> got really pissed off and complained to the manufacturer.
> And I wasn't polite about it either. Would you be?
>
> I suggest you develop some quality control for your product.
>
> Have a nice day.
> JW
> #####################################################################################
> This Mail Was Scanned by 012.net AntiVirus Service1- Powered by TrendMicro Interscan
>
Arnold, there's no need to bother talking to this stupid prick. He
doesn't really know what he is talking about; it's like teaching
calculus to a 5-year toddler. He thinks that if he picked up some bad
language from nearby working girls, he knows enough to talk to
grownups.
> Have a nice day.
We will, as soon as we forget we ever heard you.