#! /bin/sh col="$1" if [ "$col" == "" ]; then col="1" fi awk -F ',' -v"col=$col" '{ tot += $col } END { print tot }'