Created
December 12, 2012 17:36
-
-
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...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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