Skip to content

Instantly share code, notes, and snippets.

@mdnmdn
Created September 23, 2015 13:18
Show Gist options
  • Save mdnmdn/da56d8bca65ceb6658a9 to your computer and use it in GitHub Desktop.
Save mdnmdn/da56d8bca65ceb6658a9 to your computer and use it in GitHub Desktop.
Extract all http base address from a file
grep -E "https?\:" filename.config | sed -E 's/^.*(https?:\/\/[^\/"]+).*$/\1/' | sort | uniq
# use to copy to clipboard (osx only) | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment