Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Check whether the host is online with a small script

Shulou Source: shulou.com Published: 2022-06-03 07:01:22 11月23日 Update

#! / bin/sh

# filename:Check-host_online.sh

# date:2015-12-23

# author: linuxzkq

# Email:1729294227@qq.com

# version:v1.0

For n in `seq 254`

Do

Ping-C1 10.0.0.roomn > / dev/null 2 > & 1

If [$?-eq 0]

Then

Echo "10.0.0.roomn is up" > > / data/uplist.log

Else

Echo "10.0.0.roomn is down" > > / data/downlist.log

Fi

Done

Tags: Author host script online detection Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn NVidia Docker Shulou Tech Info Redmi