Sum the number in each line of a filePost Author:TimPost published:January 31, 2011Post Category:LinuxPost Comments:0 CommentsHere is the command awk '{s += $1} END {print s}' mydatafile.txt Tags: awk, sum You Might Also Like Red Hat Enterprise Linux 6.0 Benchmarks By PhoronixJanuary 30, 2011 Exim is taking apache portMarch 14, 2010 Notes on resizing file system in LVM (Shrink)June 7, 2012Leave a Reply Cancel replyCommentEnter your name or usernameEnter your emailEnter your website URL (optional) This site uses Akismet to reduce spam. Learn how your comment data is processed.