zeek/testing/scripts/diff-remove-abspath
Johanna Amann 7040e30431 Fix diff-remove-abspath on OSX
\t does not work on OS-X and just matches the letter t. This commit
replaces it with a literal tab instead.
2020-12-06 20:19:52 -08:00

12 lines
214 B
Bash
Executable file

#! /usr/bin/env bash
#
# Replace absolute paths with the basename.
if [ `uname` == "Linux" ]; then
sed="sed -r"
else
sed="sed -E"
fi
$sed 's#/+#/#g' | \
$sed 's#/([^ :/]{1,}/){1,}([^ :/]{1,})#<...>/\2#g'