======================= tabstat.awk ======================= #!/usr/bin/gawk -f # #@ get stats on values in columns of tables # # tabstat.awk -v col=1,6 table.txt # tabstat.awk col=1,6 table.txt # # command line options # [-v] col=3,5,7 take values from column 3,5,7 # warning: value of col wil be evaluated before each # new file, but only the last value will be used # # # [-v] head=foo,bar,baz headers for the selected columns # # [-v] quant=5,10,25,50,75,85,95 # show quantiles (percentages in comma separated list) # quant="" : use default 5,10,25,50,75,85,95 # quant=" " : don't give quantiles # # [-v] lineout additionally print stats on a line #