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