#!/usr/bin/gawk -f # ___ _ _ ____ ___ ___ ____ ___ ____ # | \ | | | | | |__| |__] |___ # |__/ |__| |___ | | | | | |___ # # The scripts were written to be usefull in # a research enviornment, but anyone is welcome # to use them. Happy awking. -Tim Sherwood ##################### BEGIN { name = "THISAINTGONNAMATCH"; num_names = 0; num_stats = 0; FS = ":" } ##################### { if ( name!=$1 ){ name = $1; if ( !(name in name_in) ) { name_array[num_names] = name; name_in[name] = 1; num_names++; } } if ( !($2 in stat_names) ){ stat_names[$2] = 1; stat_list[num_stats] = $2; num_stats++; } stat_array[name,$2] = $3; } ##################### END { ###print the header printf "name"; for( j=0; j