From ad2e51433ce1e3aed018472e4e14e545a0d34d3a Mon Sep 17 00:00:00 2001 From: xiaoshun Date: Thu, 30 May 2024 20:44:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 测试该网站存活的ip有哪些.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 测试该网站存活的ip有哪些.txt diff --git a/测试该网站存活的ip有哪些.txt b/测试该网站存活的ip有哪些.txt new file mode 100644 index 0000000..ce635a1 --- /dev/null +++ b/测试该网站存活的ip有哪些.txt @@ -0,0 +1,15 @@ +#!/usr/bin/bash +# +#by fuxiaoshun 4/2 +ip=1.92.66 +for i in {1..10} +do + +ping -c1 $ip &>/dev/null +if [ $? -eq 0 ];then + echo "$ip.$i通" >>/tmp/up.txt + else + echo "$ip.$i不通" >>/tmp/down.txt +fi + +done \ No newline at end of file