From 0616b38f834706a2d5323c331ce6986d7642f9fe Mon Sep 17 00:00:00 2001 From: Jensfrank Date: Thu, 27 Jun 2024 01:32:33 +0800 Subject: [PATCH] Update nodeloc_vps_autotest_ip.sh --- nodeloc_vps_autotest_ip.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nodeloc_vps_autotest_ip.sh b/nodeloc_vps_autotest_ip.sh index 8df154f..ea246d3 100644 --- a/nodeloc_vps_autotest_ip.sh +++ b/nodeloc_vps_autotest_ip.sh @@ -146,7 +146,11 @@ extract_ip_report() { local full_output=$(bash <(curl -Ls IP.Check.Place)) # 从输出中提取我们需要的部分,保留ANSI颜色代码和分隔符 - echo "$full_output" | sed -n '/^########################################################################$/,/按回车键返回主菜单.../{/按回车键返回主菜单.../!p}' + echo "$full_output" | awk ' + /^########################################################################$/ {flag=1} + flag && !/按回车键返回主菜单.../ {print} + /按回车键返回主菜单.../ {flag=0} + ' } #运行测试