How To Add a Column of Numbers Using AWK

awk '{sum+=$1}END{print sum}' inputFile
awk '{sum+=$1}END{print sum}' inputFile
Categories: How-To's, Technology Tags: Add, AWK, bash, Command line, howto, Math, Shell, Sum, tips
Copyright © 2005-2025 Eric Michael Stone | Random Thoughts, Whims and Fancies…. Powered by WordPress
Leave Your Comment
All fields marked with "*" are required.