Thanks Copericus and JoeDaddy for your answers.
JoeDaddy: I couldn't get your method to work. Can you confirm the entry you wrote? (whois $$1 | query $$1 )