#! /usr/bin/env bash
#
# Given a dump of the state database that has been converted to "key = value"
# format, this script replaces values that change between test runs with
# the string XXXXX.

# Replace bro version, bro PID, and broctl cfg hash (broctl cfg has absolute
# paths that change for each test run, so the config hash changes for each
# test run).
sed -e 's/^broversion = "[0-9.a-z-]*"/broversion = "XXXXX"/' -e 's/^configchksum = "[0-9a-f]*"/configchksum = "XXXXX"/' -e 's/^hash-broctlcfg = "[0-9a-f]*"/hash-broctlcfg = "XXXXX"/' -e 's/^\([a-z0-9-]*-pid\) = [0-9][0-9]*/\1 = XXXXX/'

