BEGIN { FS=","; # create translation table for (i=32; i<128; i++) { XT[sprintf("%02x", i)]=sprintf("%c", i); } } # this is header, print it /^C_ID/{print; next;} /^[0-9]/{ C_ID = $1; C_MESSAGE_PRIORITY=$2; C_CREATED_DATE_TIME=$3; C_WAS_PROCESSED=$4; C_XML=$5; gsub(/[^0-9a-f]/, "",C_XML); X=""; for (i=1; i