title: awk sum a column and print that sum on each line of input
body: <p>My <code>file.txt</code> looks like this:</p>
  
  <pre><code>1 12
  2 18
  3 45
  4 5
  5 71
  6 96
  7 13
  8 12
  </code></pre>
  
  <p>I can sum the second column like this: </p>
  
  <p><code>awk '{ sum += $2 } END { print sum }' file.txt</code> </p>
  
  <p><code>272</code></p>
  
  <p>What's the neatest way that I can print that sum on each line? This is what I'm expecting:</p>
  
  <pre><code>1 12 272
  2 18 272
  3 45 272
  4 5 272
  5 71 272
  6 96 272
  7 13 272
  8 12 272
  </code></pre>