#!/bin/bash for ip in `cat ips1`; do ping -W1 -c1 $ip >/dev/null && echo FOUND $ip done; unset ip