#!/bin/csh -f

if ($#argv == 0) then    #if no argument specified by user
echo "howbig - a very little utility to get total space" 
echo "occupied by files with a given extension, in the pwd."
echo "CS, Lib Systems, Aug 94"
echo "usage:  howbig <ext>"
echo "        ex. 'howbig tif'"
exit (0)
endif

#pretty simple ..
#list em       .. add up column 4    ..and print the sum
/bin/ls -l *.$1 | awk '{s += $4} END {print "Space occupied by files = " s}'

