Posted By

vikiyou on 06/05/13


Tagged

network ping


Versions (?)

ping wrapper


 / Published in: Bash
 

Send ping request to domain by removing urls, protocol, username:pass using system /bin/ping

  1. # Name: ping() wrapper
  2. # Arg: url/domain/ip
  3. # Purpose: Send ping request to domain by removing urls, protocol, username:pass using system /bin/ping
  4. ping(){
  5. local t="$1"
  6. local _ping="/bin/ping"
  7. local c=$(_getdomainnameonly "$t")
  8. [ "$t" != "$c" ] && echo "Sending ICMP ECHO_REQUEST to \"$c\"..."
  9. $_ping $c
  10. }

Report this snippet  

You need to login to post a comment.