Linux версия: for ip in `cat list.txt`; do timeout 1.5 ping -c 1 $ip; [ $? -eq 0 ] && echo $ip >> good.txt; done