zeek/testing/scripts/diff-canonifier-external
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

23 lines
545 B
Bash
Executable file

#! /usr/bin/env bash
#
# Default canonifier used with the trace-based tests in testing/external/*.
filename=`basename $1`
addl="cat"
if [ "$filename" == "capture_loss.log" ]; then
addl="`dirname $0`/diff-remove-fractions"
fi
if [ "$filename" == "ssh.log" ]; then
addl="`dirname $0`/diff-remove-fields remote_location"
fi
`dirname $0`/diff-remove-timestamps \
| `dirname $0`/diff-remove-uids \
| `dirname $0`/diff-remove-file-ids \
| `dirname $0`/diff-remove-x509-names \
| `dirname $0`/diff-sort \
| eval $addl