zeek/testing/scripts/spicy/canonify-zeek-log-sorted
Robin Sommer e6af74c8aa
Fix generation of file IDs.
They weren't stable, and potentially repetitive.

Note: We should backport this to the external plugin.
2023-05-16 10:21:20 +02:00

15 lines
368 B
Bash
Executable file

#! /usr/bin/env bash
#
# Remove unstable pieces in Zeek logs.
# Get us "modern" regexps with sed.
if [ $(uname) == "Linux" ]; then
sed="sed -r"
else
sed="sed -E"
fi
${sed} 's/^ *#(open|close).(19|20)..-..-..-..-..-..$/#\1 XXXX-XX-XX-XX-XX-XX/g' |
$(dirname $0)/diff-sort |
$(dirname $0)/diff-remove-timestamps |
$(dirname $0)/diff-remove-abspath