-
chestbrah
-
RE: linux code help
-
Yes, it is one ip per line. Timestamp can infront of the output.
This is the code without the date. it works fine but no date. I tried to attach the config file but it is not supported.
if ($1)
then
echo "Argument not found: Usage: script filename.conf"
exit
else
awk '{print "ping -i " $2 " " $1 " &"}' $1 | sh
fi | tee -a monitoring.log
wait
Configuration file:
youtube.com 15
yahoo.com
777.777.777.777 15
129.219.110.112 30
999.999.999.999 30
-
28 Feb 12
Yes, it is one ip per line. Timestamp can infront of the output.
This is the code without the date. it works fine but no date. I tried to attach the config file but it is not supported.
if ($1)
then
echo "Argument not found: Usage: script filename.conf"
exit
else
awk '{print "ping -i " $2 " " $1 " &"}' $1 | sh
fi | tee -a monitoring.log
wait
Configuration file:
youtube.com 15
yahoo.com
777.777.777.777 15
129.219.110.112 30
999.999.999.999 30