title: AWK - rounding numbers after matching a word
body: <p>I would like to print rounded numbers after a word (alter#) match. </p>
  
  <p>input.txt:</p>
  
  <pre><code>g11_21           g11_22           g11_23           g11_24          
   g11_25           g11_26           g11_27           g11_28          
   g11_29           g11_30           g11_31           g11_32          
   temper           alter#          
    9.145e-06        8.486e-06          0.5500           0.5500       
      0.5500           0.5500           0.5500           0.5500       
  </code></pre>
  
  <p>output.txt:</p>
  
  <pre><code>  0       0          1           1       
    1       1          1           1   
  </code></pre>
  
  <p>I tried with the following awk code. It can round numbers but I think I did not print them out correctly. Any help is appreciated.  </p>
  
  <pre><code>awk '/alter#/,EOF {printf("%.0f\n",$0)}' input.txt &gt; output.txt
  </code></pre>