Created
November 15, 2017 01:56
-
-
Save danielnunesdc/7d4ace209a1f4ccae946e5866f19c193 to your computer and use it in GitHub Desktop.
Mostrar máquinas ligadas na rede.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ["$1" == ""] | |
then | |
echo "ERROR - Faltou o endereço ip do alvo." | |
echo "Exemplo de uso: $0 10.0.0" | |
else | |
for host in {1..254};do | |
ping -w1 -c1 $1.$host | grep "64 bytes" | cut -d " " -f4 | sed 's/.$/ Esta online./' | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment