Skip to content

Instantly share code, notes, and snippets.

@cryptogun
Created June 26, 2024 13:42
Show Gist options
  • Select an option

  • Save cryptogun/6b40b98aab7b55faeb36100447c8fe8b to your computer and use it in GitHub Desktop.

Select an option

Save cryptogun/6b40b98aab7b55faeb36100447c8fe8b to your computer and use it in GitHub Desktop.
for i in `seq 255`
do
{
ping -c 2 192.168.1.$i -W 500 > /dev/null
if [ $? -eq 0 ]; then
echo 192.168.1.$i is ok >> ip.txt
fi
}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment