mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-11-14 03:55:19 +00:00
Update nodeloc_vps_autotest_ip.sh
This commit is contained in:
parent
76584f31ef
commit
46ded0789b
@ -161,12 +161,11 @@ format_results() {
|
|||||||
# 转义特殊字符
|
# 转义特殊字符
|
||||||
escaped_result=$(echo "$ip_quality_result" | sed 's/\\/\\\\/g; s/`/\\`/g; s/\$/\\$/g; s/\*/\\*/g; s/_/\\_/g')
|
escaped_result=$(echo "$ip_quality_result" | sed 's/\\/\\\\/g; s/`/\\`/g; s/\$/\\$/g; s/\*/\\*/g; s/_/\\_/g')
|
||||||
|
|
||||||
# 使用 heredoc 并保持转义
|
cat << EOF | iconv -f UTF-8 -t UTF-8//IGNORE > results.md
|
||||||
cat << 'EOF' | sed "s/ESCAPED_RESULT/$escaped_result/" | iconv -f UTF-8 -t UTF-8//IGNORE > results.md
|
|
||||||
[tabs]
|
[tabs]
|
||||||
[tab="IP质量"]
|
[tab="IP质量"]
|
||||||
\`\`\`
|
\`\`\`
|
||||||
ESCAPED_RESULT
|
$escaped_result
|
||||||
\`\`\`
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[/tabs]
|
[/tabs]
|
||||||
|
Loading…
Reference in New Issue
Block a user