mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/sed-E-everywhere'
* origin/topic/awelzel/sed-E-everywhere: testing/scripts: Use sed -E everywhere
This commit is contained in:
commit
a16179eae7
11 changed files with 24 additions and 75 deletions
9
CHANGES
9
CHANGES
|
@ -1,3 +1,12 @@
|
||||||
|
6.2.0-dev.463 | 2024-01-24 23:04:38 +0100
|
||||||
|
|
||||||
|
* testing/scripts: Use sed -E everywhere (Arne Welzel, Corelight)
|
||||||
|
|
||||||
|
I'm always a bit worried to use sed -E anywhere, because the canonifiers
|
||||||
|
give the impression it won't work everywhere consistently. My manpage says
|
||||||
|
sed -E should be preferred for portability, so lets remove the
|
||||||
|
sed -r / sed -E differentiation assuming it's just a thing from the past.
|
||||||
|
|
||||||
6.2.0-dev.461 | 2024-01-24 23:04:12 +0100
|
6.2.0-dev.461 | 2024-01-24 23:04:12 +0100
|
||||||
|
|
||||||
* HTTP: Coverity std::move suggestion (Arne Welzel, Corelight)
|
* HTTP: Coverity std::move suggestion (Arne Welzel, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
6.2.0-dev.461
|
6.2.0-dev.463
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
# - The version number, which becomes "x.y.z"
|
# - The version number, which becomes "x.y.z"
|
||||||
# - Spacing in the report, which we normalize to single spaces
|
# - Spacing in the report, which we normalize to single spaces
|
||||||
|
|
||||||
# Get us "modern" regexps with sed.
|
sed -E -e 's/[0-9]+ skipped/XX skipped/g' |
|
||||||
if [ $(uname) == "Linux" ]; then
|
sed -E -e 's/"[0-9]+\.[0-9]+\.[0-9]+"/"x.y.z"/g' |
|
||||||
sed="sed -r"
|
sed -E -e 's/ {2,}/ /g'
|
||||||
else
|
|
||||||
sed="sed -E"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$sed -e 's/[0-9]+ skipped/XX skipped/g' |
|
|
||||||
$sed -e 's/"[0-9]+\.[0-9]+\.[0-9]+"/"x.y.z"/g' |
|
|
||||||
$sed -e 's/ {2,}/ /g'
|
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
#
|
#
|
||||||
# Replace absolute paths with the basename.
|
# Replace absolute paths with the basename.
|
||||||
|
|
||||||
if [ $(uname) == "Linux" ]; then
|
sed -E 's#/+#/#g' |
|
||||||
sed="sed -r"
|
sed -E 's#[^( ]*testing_btest#<___>testing_btest#' |
|
||||||
else
|
sed -E 's#([a-zA-Z]:)?/([^ :/]{1,}/){1,}([^ :/]{1,})#<...>/\3#g'
|
||||||
sed="sed -E"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$sed 's#/+#/#g' |
|
|
||||||
$sed 's#[^( ]*testing_btest#<___>testing_btest#' |
|
|
||||||
$sed 's#([a-zA-Z]:)?/([^ :/]{1,}/){1,}([^ :/]{1,})#<...>/\3#g'
|
|
||||||
|
|
|
@ -2,11 +2,4 @@
|
||||||
#
|
#
|
||||||
# Replace timestamps in the #start/end markers in logs.
|
# Replace timestamps in the #start/end markers in logs.
|
||||||
|
|
||||||
# Get us "modern" regexps with sed.
|
sed -E 's/^ *#(open|close).(19|20)..-..-..-..-..-..$/#\1 XXXX-XX-XX-XX-XX-XX/g'
|
||||||
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'
|
|
||||||
|
|
|
@ -3,10 +3,4 @@
|
||||||
# Replace absolute paths in Spicy error message with the basename. This is more
|
# Replace absolute paths in Spicy error message with the basename. This is more
|
||||||
# restrictive than diff-remove-abspath to avoid catching other stuff.
|
# restrictive than diff-remove-abspath to avoid catching other stuff.
|
||||||
|
|
||||||
if [ $(uname) == "Linux" ]; then
|
sed -E 's#/([^:/]{1,}/){1,}([^:/]{1,}\.spicy[:,])#<...>/\2#g'
|
||||||
sed="sed -r"
|
|
||||||
else
|
|
||||||
sed="sed -E"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$sed 's#/([^:/]{1,}/){1,}([^:/]{1,}\.spicy[:,])#<...>/\2#g'
|
|
||||||
|
|
|
@ -2,11 +2,4 @@
|
||||||
#
|
#
|
||||||
# Replace anything which looks like timestamps with XXXs (including the #start/end markers in logs).
|
# Replace anything which looks like timestamps with XXXs (including the #start/end markers in logs).
|
||||||
|
|
||||||
# Get us "modern" regexps with sed.
|
sed -E -e 's/(^|[^0-9])([0-9]{9,10}\.[0-9]{1,8})/\1XXXXXXXXXX.XXXXXX/g' -e 's/^ *#(open|close).(19|20)..-..-..-..-..-..$/#\1 XXXX-XX-XX-XX-XX-XX/g'
|
||||||
if [ $(uname) == "Linux" ]; then
|
|
||||||
sed="sed -r"
|
|
||||||
else
|
|
||||||
sed="sed -E"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$sed -e 's/(^|[^0-9])([0-9]{9,10}\.[0-9]{1,8})/\1XXXXXXXXXX.XXXXXX/g' -e 's/^ *#(open|close).(19|20)..-..-..-..-..-..$/#\1 XXXX-XX-XX-XX-XX-XX/g'
|
|
||||||
|
|
|
@ -2,13 +2,6 @@
|
||||||
#
|
#
|
||||||
# Remove unstable pieces in Zeek logs.
|
# Remove unstable pieces in Zeek logs.
|
||||||
|
|
||||||
# Get us "modern" regexps with sed.
|
sed -E 's/^ *#(open|close).(19|20)..-..-..-..-..-..$/#\1 XXXX-XX-XX-XX-XX-XX/g' |
|
||||||
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-remove-timestamps |
|
$(dirname $0)/diff-remove-timestamps |
|
||||||
$(dirname $0)/diff-remove-abspath
|
$(dirname $0)/diff-remove-abspath
|
||||||
|
|
|
@ -2,14 +2,7 @@
|
||||||
#
|
#
|
||||||
# Remove unstable pieces in Zeek logs.
|
# Remove unstable pieces in Zeek logs.
|
||||||
|
|
||||||
# Get us "modern" regexps with sed.
|
sed -E 's/^ *#(open|close).(19|20)..-..-..-..-..-..$/#\1 XXXX-XX-XX-XX-XX-XX/g' |
|
||||||
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-sort |
|
||||||
$(dirname $0)/diff-remove-timestamps |
|
$(dirname $0)/diff-remove-timestamps |
|
||||||
$(dirname $0)/diff-remove-abspath
|
$(dirname $0)/diff-remove-abspath
|
||||||
|
|
|
@ -2,11 +2,5 @@
|
||||||
#
|
#
|
||||||
# Replace absolute paths with the basename.
|
# Replace absolute paths with the basename.
|
||||||
|
|
||||||
if [ $(uname) == "Linux" ]; then
|
sed -E 's#/+#/#g' |
|
||||||
sed="sed -r"
|
sed -E 's#/([^ :/]{1,}/){1,}([^ :/]{1,})#<...>/\2#g'
|
||||||
else
|
|
||||||
sed="sed -E"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$sed 's#/+#/#g' |
|
|
||||||
$sed 's#/([^ :/]{1,}/){1,}([^ :/]{1,})#<...>/\2#g'
|
|
||||||
|
|
|
@ -2,11 +2,4 @@
|
||||||
#
|
#
|
||||||
# Replace anything which looks like timestamps with XXXs (including the #start/end markers in logs).
|
# Replace anything which looks like timestamps with XXXs (including the #start/end markers in logs).
|
||||||
|
|
||||||
# Get us "modern" regexps with sed.
|
sed -E 's/(^|[^0-9])([0-9]{9,10}\.[0-9]{1,8})/\1XXXXXXXXXX.XXXXXX/g' -e 's/^ *#(open|close).(19|20)..-..-..-..-..-../#\1 XXXX-XX-XX-XX-XX-XX/g'
|
||||||
if [ $(uname) == "Linux" ]; then
|
|
||||||
sed="sed -r"
|
|
||||||
else
|
|
||||||
sed="sed -E"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$sed -e 's/(^|[^0-9])([0-9]{9,10}\.[0-9]{1,8})/\1XXXXXXXXXX.XXXXXX/g' -e 's/^ *#(open|close).(19|20)..-..-..-..-..-../#\1 XXXX-XX-XX-XX-XX-XX/g'
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue