#!/usr/bin/gawk -f # /* vim: set filetype=awk : */ -*- awk -*- BEGIN { FS=OFS=","; Header = 1; Number = "^[ \t]*[+-]?([0-9]+[.]?[0-9]*|[.][0-9]+)([eE][+-]?[0-9]+)?[ \t]*"; } NR==1 { for(I=1;I<=NF;I++) { Name[I] = $I; Numeric[I] = 1; } } NR> Header { for(I=1;I<=NF;I++) { Numeric[I] = Numeric[I] && $I ~ Number; if (++Count[I,$I]==1) Word[I,++Word[I,0]]=$I }; } END { print range(NF) print " " for(I=1;I