Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
awk [2014/04/04 16:14]
127.0.0.1 external edit
awk [2016/02/17 10:26] (current)
steve
Line 13: Line 13:
 </​code>​ </​code>​
  
 +== Print the last column ==
  
 +<​code>​
 +awk '{ print $NF }'
 +</​code>​
 +
 +== Print a total of a column of numbers in a file ==
 +
 +<​code>​
 +awk '{ sum += $1 } END { print sum }' filename
 +</​code>​