[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] pretty-print eats header comments
From: |
Hermann Peifer |
Subject: |
Re: [bug-gawk] pretty-print eats header comments |
Date: |
Fri, 02 Jan 2015 08:24:03 -0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 2014-12-31 15:44, Hermann Peifer wrote:
Thanks for taking care. I upudated from git master and noted that pretty
printing works much better now.
I now noted that a comment from the END rule is moved to the top, which
is somewhat surprising. See below.
Hermann
$ cat test.awk
# Some
# header
# comments
# Add up
{ sum += $1 }
# Print sum
END { print sum }
$ awk -o/dev/stdout -f test.awk
# Print sum
# Some
# header
# comments
# Add up
{
sum += $1
}
END {
print sum
}
- Re: [bug-gawk] pretty-print eats header comments,
Hermann Peifer <=