awk -F "\t" 'BEGIN{OFS="\t"}{ print $10,$9,$8,$7,$6,$5,$4,$3,$2substr($1,3);  }' subnetL.txt > subnetL1.txt


awk -F "\t" 'BEGIN{ OFS="\t"; W[255] = "-"; print "larssrcIP\tlarsdstIP\tgeoIPsrcIP\tgeoIPdstIP";wq} NR==FNR {W[$2] = $4; next;} { printf "%s\t%s\t%s\t%s\n", W[strtonum(substr($9,1,4))], W[strtonum(substr($12,1,4))], tolower($17), tolower($25);  }' /home/stefan/.tranalyzer/plugins/id2iso3166 merged_31_20h00_flows.txt

awk -F "\t" 'BEGIN{ OFS="\t"; W[255] = "-"; print "larssrcIP\tlarsdstIP\tgeoIPsrcIP\tgeoIPdstIP";wq} NR==FNR {W[$2] = $4; next;} { a= W[strtonum(substr($9,1,4))]; b= W[strtonum(substr($12,1,4))]; if (a != tolower($17) || b != tolower($25)) print $2,$8,$9,a,$11,$12,b,tolower($17),tolower($25); }' /home/stefan/.tranalyzer/plugins/id2iso3166 merged_31_20h00_flows.txt

awk -F "\t" 'BEGIN{ OFS="\t"; W[255] = "-"; i=0; print "larssrcIP\tlarsdstIP\tgeoIPsrcIP\tgeoIPdstIP";wq} NR==FNR {W[$2] = $4; next;} { a= W[strtonum(substr($9,1,4))]; b= W[strtonum(substr($12,1,4))]; if (a != tolower($17) || b != tolower($25)) {i++} } END{print "errorlars:", i}' /home/stefan/.tranalyzer/plugins/id2iso3166 merged_31_20h00_flows.txt
