mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-11-10 10:05:18 +00:00
Update nodeloc_vps_autotest_ip.sh
This commit is contained in:
parent
3ded3c6dc9
commit
515b9e1f07
@ -156,17 +156,20 @@ run_all_tests() {
|
||||
format_results
|
||||
}
|
||||
|
||||
# 格式化结果为 Markdown
|
||||
format_results() {
|
||||
result="[tabs]
|
||||
# 预处理 IP 质量结果,去除可能导致问题的字符
|
||||
cleaned_result=$(echo "$ip_quality_result" | sed 's/[[:cntrl:]]//g' | iconv -f UTF-8 -t UTF-8 -c)
|
||||
|
||||
result="[tabs]
|
||||
[tab=\"IP质量\"]
|
||||
\`\`\`
|
||||
$ip_quality_result
|
||||
$cleaned_result
|
||||
\`\`\`
|
||||
[/tab]
|
||||
[/tabs]
|
||||
"
|
||||
echo "$result" > results.md
|
||||
# 使用 UTF-8 编码写入文件
|
||||
echo "$result" | iconv -f UTF-8 -t UTF-8 -c > results.md
|
||||
echo -e "${GREEN}结果已保存到 results.md 文件中。${NC}"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user