[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] pretty-print eats parentheses
From: |
Hermann Peifer |
Subject: |
[bug-gawk] pretty-print eats parentheses |
Date: |
Thu, 30 Oct 2014 05:03:41 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Hi Arnold and others,
Below a small observation which I made while trying to construct a
string consisting of negative integers with FS in between.
I'm on gawk from git, on OSX 10.10.
Regards, Hermann
PS: I had a feeling of "déjà vu", but this historical issue was slightly
different:
http://lists.gnu.org/archive/html/bug-gnu-utils/2009-08/msg00018.html
-------
# Does not work as I expected..
$ gawk 'BEGIN{FS="|"; str = -8 FS -9 ; print str}'
-8-9
# ..but this does
$ gawk 'BEGIN{FS="|"; str = -8 FS (-9) ; print str}'
-8|-9
# My parentheses are gone :-(
$ gawk -o/dev/stdout 'BEGIN{FS="|"; str = -8 FS (-9) ; print str}'
BEGIN {
FS = "|"
str = -8 FS -9
print str
}
- [bug-gawk] pretty-print eats parentheses,
Hermann Peifer <=