Update nodeloc_vps_autotest_ip.sh

This commit is contained in:
Jensfrank 2024-06-27 01:32:33 +08:00 committed by GitHub
parent 7345c67aa9
commit 0616b38f83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}
'
}
#运行测试