Skip to content

Instantly share code, notes, and snippets.

@math2001
Created July 7, 2018 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save math2001/027748fe45be511b9728152cf5458a9d to your computer and use it in GitHub Desktop.
Save math2001/027748fe45be511b9728152cf5458a9d to your computer and use it in GitHub Desktop.
Ping every ip on the local network
#! /usr/bin/sh
trap 'exit' SIGINT
for i in `seq 254`; do
(ping 192.168.1.$i -c 1 -w 1 > /dev/null && echo 192.168.1.$i)&
done
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment