title: Pretty print table with awk
body: <p>I want to print a table that looks like this:</p>
  
  <pre><code>&gt; field1 field2 field3 field4    
  &gt; 11.79     7.87    11.79    68   
  &gt; .. more numbers
  </code></pre>
  
  <p>How can I arrange it that the captions for the columns are arranged in a way that
  puts them on top of the respective column?</p>
  
  <pre><code>&gt; field1    field2  field3   field4       
  &gt; 11.79     7.87    11.79    68
  &gt; .. more numbers
  </code></pre>
  
  <p>My generating script looks like this:
  capture.sh:</p>
  
  <pre><code>  echo 'field1, field2, field3, field4'
    awk '/Capture the tablestuff/{set variables}
    /DONE/ { printf("%5d %8.2f %8.2f %8.2f \n" ,field1, field2, field3, filed4); '
  </code></pre>
  
  <p>I really would like to refrain from ascii-formatting the echo command if I can. </p>