|
From: | Ed Morton |
Subject: | Re: [bug-gawk] -i infile unexpected behavior |
Date: | Sun, 15 Mar 2015 12:35:09 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
Andy -
Could you move the code that terminates the inplace processing from the ENDFILE to a BEGINFILE rule?On 3/15/2015 11:26 AM, Andrew J. Schorr wrote:The "inplace" include file contains an ENDFILE rule that terminates the inplace processing. Consider an alternative approach: bash-4.2$ awk 'ENDFILE {print "bar"}; @include "inplace"' file bash-4.2$ cat file bar bash-4.2$ This includes the "inplace" ENDFILE rule after yours, so that the print occurs before the "inplace" processing is terminated. In other words, the ordering of the ENDFILE rules matters.
Ed.
[Prev in Thread] | Current Thread | [Next in Thread] |