#!/bin/bash # Program name: pingall.sh date cat ./dominios.txt | while read output do ping -c 3 "$output" >> resultado.txt if [ $? -eq 0 ]; then echo "node $output is up" else echo "node $output is down" fi done ----------- cat resultado.txt | grep IP >> final.txt --------------- cat final.txt | grep PING | wc -l
Comments