#! /bin/sh ifile="topdat/Jan_2011/1001/data/import/import_VNA_Jan_2011_INV008497_detail.csv" awk -F ',' ' { amount_incgst = $19 tot += amount_incgst } END { print "tot = " tot } ' <"$ifile" | tee $0.out