Skip to content

Instantly share code, notes, and snippets.

@felclef
Created December 12, 2012 17:36
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 felclef/4269861 to your computer and use it in GitHub Desktop.
Save felclef/4269861 to your computer and use it in GitHub Desktop.
Better ping cuz I hate when I need to select part of a URL to ping. And it gets worse when it comes to Chrome, which copies the http:// stuff :P Put this on you bash/zsh rc file or whatever you want...
#!/bin/bash
function ping() {
lph=`echo $1 | sed 's#https*://\([^/]*\)/.*#\1#'`
/sbin/ping $lph
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment