#!/bin/sh # csum -- sum a column if [ -z "$1" ]; then echo "usage: csum N [files]" >&2 exit 1 fi awk ' { s += $'$1' } END { print s } '