Simple Bash Ping Script

Been looking for something like this for a while:

http://etherealmind.com/tech-notes-ping-sweep-ip-subnet/

for i in `seq 1 255`; do ping -c 1 192.168.1.$i | tr \\n ‘ ‘ | awk ‘/1 received/ {print $2}’; done

I usually use nMAP for this, but in some instances you may not have access to it. For those times, Bash should work really well.

Advertisements

One thought on “Simple Bash Ping Script

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s