Skip to content

Instantly share code, notes, and snippets.

@johanmeiring
Created August 8, 2013 08:28
Show Gist options
  • Select an option

  • Save johanmeiring/6182729 to your computer and use it in GitHub Desktop.

Select an option

Save johanmeiring/6182729 to your computer and use it in GitHub Desktop.

Revisions

  1. johanmeiring created this gist Aug 8, 2013.
    9 changes: 9 additions & 0 deletions pingsubnet.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/bash

    COUNTER=1

    rm ips
    while [[ $COUNTER -lt 255 ]]; do
    ping 192.168.254.$COUNTER -c 1 -W 1 && echo "192.168.254.$COUNTER" >> ips
    COUNTER=$(( $COUNTER + 1 ))
    done