1 2 3 4 5 6 7
#!/bin/bash COUNT=0 while read i j; do if [ $j -eq 1 ]; then COUNT=$((COUNT+1)); fi done < $1 test $COUNT -eq 1280