zeek/testing/scripts/diff-remove-uids
Daniel Thayer 6f1e07f6d5 Fixed some test canonifiers to read only from stdin
Fixed some test canonifier scripts to read from stdin instead of
from a filename specified as a cmd-line argument.  This is needed
in order to be able to reliably use them in a pipeline with other
test canonifiers.

Also removed some unused test canonifier scripts.
2015-09-18 17:30:26 -05:00

20 lines
287 B
Bash
Executable file

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