Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement