Update nodeloc_vps_autotest_fusion.sh

This commit is contained in:
Jensfrank 2024-06-27 15:46:43 +08:00 committed by GitHub
parent 0c67071763
commit 68879cf232
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,7 +135,8 @@ declare -a test_results
# 去除融合怪板块板块ANSI转义码
fusion_process_output() {
local input="$1"
echo "$input" | sed 's/\x1b\[[0-9;]*m//g' | awk '/A Bench Script/{f=1} f; /时间/{f=0}'
# 使用更全面的 sed 命令去除所有 ANSI 转义码
echo "$input" | sed -E 's/\x1b\[[0-9;]*[a-zA-Z]//g' | awk '/A Bench Script/{f=1} f; /时间/{f=0}'
}
# 在每个命令执行后保存结果