zeek/testing/scripts/diff-remove-uids
2015-09-19 18:08:31 -05:00

22 lines
321 B
Bash
Executable file

#! /usr/bin/env bash
#
# A diff canonifier that removes all connection UIDs.
awk '
BEGIN { FS="\t"; OFS="\t"; }
/^[^#]/ {
if ( column > 0 ) {
$column = "XXXXXXXXXXX";
}
}
/^#fields/ {
for ( i = 2; i <= NF; ++i ) {
if ( $i == "uid" )
column = i - 1;
}
}
{ print }
'