#!/bin/bash subnet="$1" if [[ "X" == "X${subnet}" ]] then echo "Usage: ${0} 130.39.19.0/25" exit fi fing -r 1 --silent -n ${subnet} -o table,csv