[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] pretty-print eats header comments
From: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] pretty-print eats header comments |
Date: |
Fri, 16 Jan 2015 13:46:57 +0200 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
Hi.
We've got this fixed. It will be appearing in master shortly.
Thanks!
Arnold
> On 2014-12-31 15:44, Hermann Peifer wrote:
> 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
> }