<div dir="ltr"><div>Thanks,</div><div><br></div><div>      whois -cca $x | grep -q '^Not found:' && echo $x</div><div><br></div><div>works well.... at least until the whois connect starts timing out.</div><div><br></div><div>../Dave<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 25 Jul 2024 at 17:02, Scott Allen <<a href="mailto:mlxxxp@gmail.com">mlxxxp@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 25 Jul 2024 at 16:38, Scott Allen <<a href="mailto:mlxxxp@gmail.com" target="_blank">mlxxxp@gmail.com</a>> wrote:<br>
>> On Thu, 25 Jul 2024 at 16:27, Scott Allen <<a href="mailto:mlxxxp@gmail.com" target="_blank">mlxxxp@gmail.com</a>> wrote:<br>
> > Doing a grep on whois output for "Registrar:" (perhaps case<br>
> > insensitive) might be fairly reliable.<br>
> Even that doesn't always work. E.g.:<br>
> whois <a href="http://abc.de" rel="noreferrer" target="_blank">abc.de</a><br>
> I give up (on using whois, at least).<br>
<br>
This is assuming you want something that will work for any TLD. For a<br>
single given TLD, the whois output should be consistent enough that<br>
you could figure out something to determine if a domain is registered<br>
or not.<br>
<br>
For instance, for the .ca domain it looks like just checking the first<br>
output line for "Not found:" is sufficient to indicate a domain hasn't<br>
been registered.<br>
<br>
<br>
--<br>
Scott<br>
</blockquote></div>