Update nodeloc_vps_autotest_ip.sh

This commit is contained in:
Jensfrank 2024-06-27 02:05:05 +08:00 committed by GitHub
parent 483a74bc7e
commit b0c6d9ced8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,7 +169,7 @@ extract_ip_report() {
# 执行下载的脚本
local bash_output
bash_output=$(bash "$temp_script")
bash_output=$(bash "$temp_script" 2>&1)
local bash_exit_code=$?
echo "bash 退出码: $bash_exit_code" >&2
@ -189,7 +189,7 @@ extract_ip_report() {
/^########################################################################$/ {flag=1}
flag && !/按回车键返回主菜单.../ {print; lines++}
/按回车键返回主菜单.../ {flag=0}
END {print "awk 处理后的行数: " lines > "/dev/stderr"}
END {print "共输出 " lines " 行" > "/dev/stderr"}
'
}
@ -233,7 +233,6 @@ $ip_quality_result
[/tabs]"
echo "$result" > /root/results.md
echo -e "${GREEN}结果已保存到 /root/results.md 文件中。${NC}"
echo "保存的结果长度: $(wc -l < /root/results.md)" >&2
}
# 复制结果到剪贴板
@ -247,7 +246,7 @@ copy_to_clipboard() {
echo -e "${GREEN}结果已复制到剪贴板。${NC}"
else
echo -e "${RED}无法复制到剪贴板。请手动复制 /root/results.md 文件内容。${NC}"
fi
}
else
echo -e "${RED}/root/results.md 文件不存在。${NC}"
fi