Commit 27d55073 authored by joubran.mansour's avatar joubran.mansour

Delete Alive.sh

parent 87dbb075
#!/bin/bash
touch file
echo "$1" > file
first=$(echo $($file | cut -d"-" -f 1 | cut -d"." -f 4))
second=$(echo $($file | cut -d"-" -f 2 | cut -d"." -f 4))
if [ $first -lt $second ];
then
for n in {$first..$second}; do
host=192.168.1.$n
ping -c2 $host &> /dev/null
if [ $? = 0 ]; then
echo "$host is UP"
else
echo "$host is DOWN"
fi
done
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment