Created
January 24, 2017 19:43
-
-
Save ebuildy/8117d3c1748dc1f26d39d02fe1b8c4a7 to your computer and use it in GitHub Desktop.
Extract protocol, host and port from URL like "PROTOCOL://HOST:PORT"
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
PROXY_PROTOCOL=$(echo "${HTTP_PROXY%%:*}") | |
PROXY_HOST=$(echo "${HTTP_PROXY%:*}") | |
PROXY_HOST=$(echo "${PROXY_HOST##*/}") | |
PROXY_PORT=$(echo "${HTTP_PROXY##*:}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment