Skip to content

Instantly share code, notes, and snippets.

@shahifaqeer
Created December 9, 2013 09:34
Show Gist options
  • Save shahifaqeer/7869688 to your computer and use it in GitHub Desktop.
Save shahifaqeer/7869688 to your computer and use it in GitHub Desktop.
#!/bin/sh
A='192.168.10.184'
B='192.168.10.158'
C='192.168.10.142'
R='192.168.10.1'
S='192.168.20.1'
echo "usage on machine A: sh pingall.sh 'A'"
ping $A | while read pong; do echo "[$(date +'%s')]: $pong"; done >> "Browserlab/pings/R_A.log" &
ping $B | while read pong; do echo "[$(date +'%s')]: $pong"; done >> "Browserlab/pings/R_B.log" &
ping $C | while read pong; do echo "[$(date +'%s')]: $pong"; done >> "Browserlab/pings/R_C.log" &
ping $S | while read pong; do echo "[$(date +'%s')]: $pong"; done >> "Browserlab/pings/R_S.log" &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment