|
From: | Hermann Peifer |
Subject: | [bug-gawk] pretty-print eats header comments |
Date: | Sun, 02 Nov 2014 13:52:06 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Hi again.Arnold wrote the other day about excising remaining problems of the pretty printer. Here is what I just found: header comments are gone in cases where the BEGIN rule starts with a comment (see test1.awk) whereas they are kept in the test2.awk example.
Hermann ==> test1.awk <== $ cat test1.awk # Some # comments # here # BEGIN { # Field separator FS = "\t" } $ awk -o/dev/stdout -f test1.awk # Field separator BEGIN { FS = "\t" } ==> test2.awk <== $ cat test2.awk # Some # comments # here # BEGIN { FS = "\t" # Field separator } $ awk -o/dev/stdout -f test2.awk # Some # comments # here # BEGIN { FS = "\t" # Field separator }
[Prev in Thread] | Current Thread | [Next in Thread] |