#!/bin/sh rm ./activehosts.txt > /dev/null 2>&1 if [ "$1" = "" ] then echo "No IP subnet has been specfied";exit fi if [ "$1" = "-h" ] then echo " This Script Must Be Run As Root. Command Sytnax: For CLI output: activehosts.sh xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx For Report: activehosts.sh xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx -r Activehosts.sh is a wrapper script for fping. It formats the output to be compaired to the report results of dnsdump.sh";exit fi if [ "$3" = "-r" ] then ./fping -ga $1 $2 | awk '{print $1 | "sort -t +1.13"}' > $1-acthost-`date +%m-%d-%y`.txt;more $1-acthost-`date +%m-%d-%y`.txt;echo "The report name is $1-acthost-`date +%m-%d-%y`";exit else ./fping -ga $1 $2 > ./hosts;more ./hosts | awk '{print $1}';rm -rf ./hosts;exit fi