Tally

Tally up a column of figures
case "$1" in [1-9]*) colnum="$1"; shift;;  *) echo "Usage: `basename $0` colnum [files]" 1>&2; exit 1;; esac awk '{sum += $col} END {print sum}' col=$colnum OFMT='%.2f' ${1+"$@"}
 * 1) ! /bin/sh