#!/bin/sh
#
# Add values in the column given at the commandline separated by linefeeds
#

awk -v column=$1 'BEGIN { print "Adding numbers in column", column }
{ total += $column }
END { print "column total is", total}'