lanscan.sh 180 B

123456789101112131415
  1. #!/bin/bash
  2. NET="192.168.1."
  3. for i in {0..120}
  4. do
  5. ADR="${NET}${i}"
  6. echo "scan $ADR"
  7. if ping -c 1 $ADR &> /dev/null
  8. then
  9. echo "$ADR is alive"
  10. fi
  11. done