needs bash
This commit is contained in:
parent
4283c7b822
commit
9a032bcff0
1 changed files with 2 additions and 2 deletions
|
@ -1,11 +1,11 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
if [ -z "$1" ]; then
|
||||
HOSTS="`grep -v ^# MASTER_LIST | cut -d\| -f3`"
|
||||
else
|
||||
HOSTS="`cat \"$1\"`"
|
||||
fi
|
||||
for HOST in $HOSTS; do
|
||||
ping -c 3 -q $HOST >/dev/null 2>&1
|
||||
ping -c 1 -q $HOST >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "\033[1;37m\033[42m[ UP ]\033[0m $HOST"
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue