[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Change in the order of precedence for the redirection operator?
From: |
Tony Leneis |
Subject: |
Change in the order of precedence for the redirection operator? |
Date: |
Tue, 25 Oct 2005 03:16:50 -0700 |
User-agent: |
Mutt/1.5.4i |
It looks like there's been a change in the precedence of the |
redirection operator in gawk between versions 3.1.1 and 3.1.4. Here's
an awk program that illustrates the change (it requires a Unix like
environment):
gawk 'BEGIN { "echo " "date" | getline; print }'
When gawk 3.0.3, 3.1.0 and 3.1.1 run the program the output is the word
"date", so getline was reading the output of "echo date". When gawk
3.1.4 and gawk 3.1.5 run the program the output is the current date, so
getline is presumably reading the output of "date".
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.
-Tony
This message and any attachments are intended only for the use of the addressee
and may contain information that is privileged and confidential. If the reader
of the message is not the intended recipient or an authorized representative of
the intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail and delete the message and any
attachments from your system.
- Change in the order of precedence for the redirection operator?,
Tony Leneis <=