-
-
Save sasqwatch/52984c4a87412aaffe7de509c9c60ea2 to your computer and use it in GitHub Desktop.
onliner to resolve the host of a given url
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
host `echo https://pass:user@abracadabra-mms.starbucks.com:2996/utils/|sed "s/.*:\/\///"|cut -d '/' -f 1|cut -d '@' -f 2|cut -d':' -f 1` | |
function ohost { | |
host `echo $1|sed "s/.*:\/\///"|cut -d '/' -f 1|cut -d '@' -f 2|cut -d':' -f 1` | |
} | |
function ohosts { | |
while read u; do host `echo $u|sed "s/.*:\/\///"|cut -d '/' -f 1|cut -d '@' -f 2|cut -d':' -f 1`; done < $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment