Answer the question
In order to leave comments, you need to log in
How to make an alias for whois to feed it urls, not domains?
I want to make it possible to give the whois command any URL, and not just a domain.
Came up with homies 2 options:
alias h="echo \$2 | awk -F/ '{print \$3}'|xargs /usr/bin/whois"
alias h='echo $2 | sed -E "s~^http://([^/]+)/~\1~"|xargs /usr/bin/whois'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question