#!/bin/bash
for ((i=1; i<=254;i=i+1))
        do
                ping  -c 2  10.0.0.$1 &>/dev/null
                if [ $? -eq 0 ]; then
                        echo -e "10.0.0.$i is up\t" >> /ping.log
                else
                        echo -e "10.0.0.$i is down\t" >>/ping.log
                fi

        done