Advertisement
ujiajah1

checking_connection.sh

May 15th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.18 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. is_alive_ping()
  4. {
  5.   ping -c 1 $1 > /dev/null
  6.   [ $? -eq 0 ] && echo Node with IP: $i is up.
  7. }
  8.  
  9. for i in 192.168.1.{1..255}
  10. do
  11. is_alive_ping $i & disown
  12. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement