Small Whois Script
I am trying to write a script that will do a whois on a domain but only print out the email addresses and if there is not one listed than say something like "No Address on file" or something. Does anyone have any ideas on how to do that?
What I have been trying to do is something like: whois iamned.com | grep "Tech Email" > file -v Any help would be greatly appreciated! Tarken |
The only significant problem you'll have is that most registrants list the email information in a different format.
For instance, perform a 'whois google.com' and a 'whois yourdomain.com' and a 'whois -h whois.tucows.com sourceforge.net' Code:
#!/bin/bash You might be further ahead to make a full script to parse whois outputs in perl, ruby, or python. |
Quote:
What does '\w+([._-]\w)*@\w+([._-]\w)*\.\w{2,4}' do? |
Quote:
Code:
core:~/test/test23$ cat wi.sh |
It may not necessarily be "Tech Email" across all registrars.
|
All times are GMT -5. The time now is 05:39 PM. |