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 Startup with full text mode in CentOS 6March 22, 2012 [Problem] Atheros Lan Drivers Installation in CentOS 5.4 x_64March 6, 2010 Linux Ethernet Bonding – load balancing / active-passiveJanuary 15, 2011Leave 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.