#!/bin/sh
# sizeof - report size of files, totalled

case $# in
0)	echo "Usage: sizeof file ..." >&2 ; exit 2 ;;
esac

ls -ld $* 2>/dev/null | awk 'BEGIN { tot = 0 }
	{
		if (NF == 8)
			tot += $4
		else if (NF == 9)	# stupid clowns in AT&T changed format
			tot += $5
	}
	END { print tot }'
