#!/usr/bin/gawk -f #/* vim: set filteype=awk : */ -*- awk -*- {sub(/\%.*/,"")} {gsub(/[\'\"]/,"",$0)} {sub(/\#.*/,"")} {sub(/\|.*/,"")} /^[ \t]*$/ {next} { split($0,a,",") score=0 for (I in a){score++} print score # comm="export NumClasses=" score # print comm # print ENVIRON["NumClasses"] # ENVIRON["NumClasses"]=score # system(comm) # print "NumClasses = " ENVIRON["NumClasses"] exit }