executing:
./cs450grade_undergrad.sh
echo "$1,$2,$3,$4,$5,$6,$7,$8,$9" |\
gawk -v RS=, 'BEGIN{split("hw1 hw2 hw3 mid hw4 hw5 hw6 fin proj",name); split("15 15 15 40 15 15 15 70 50",maxpoints)} {line++; print name[NR],$0/maxpoints[NR],maxpoints[NR]}' | sort -k 2 -nr | awk 'max < 100 {rest=($3+max<100)?$3:100-max; max+=rest; score+=rest*$2; print "scored "$2*$3"/"$3" on "$1" prorated at "rest"/"$3"="100*rest/ $3"%, aggregate score",score"/"max}'