File: diff-canonifier-external

package info (click to toggle)
bro 2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 78,640 kB
  • sloc: ansic: 126,302; cpp: 95,205; yacc: 2,528; lex: 1,819; sh: 793; python: 700; makefile: 134
file content (28 lines) | stat: -rwxr-xr-x 624 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /usr/bin/env bash
#
# Default canonifier used with the trace-based tests in testing/external/*.

if [ $# != 1 ]; then
    echo "usage: `basename $0` <filename>"
    exit 1
fi

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