[PLUG] whois command without boilerplate

Keith Lofstrom keithl at kl-ic.com
Sun Aug 29 02:43:56 UTC 2021


On Sat, Aug 28, 2021 at 04:53:19PM -0700, Michael Rasmussen wrote:
> This works assuming you have perl and the same whois output I do:
> 
>    whois <object to whois on> | perl -ane 'print; if (/^$/) {exit};'
> 
> As an example:
> whois saunter.us | perl -ane 'print; if (/^$/) {exit};'

That worked for some a few .com and .us and .org, thanks! 
I stuffed that one-liner in a shell script named

/usr/local/bin/whoi

-----
I may need something more clever, though:

whoi toshiba.jp 
whoi dlr.de

... return cruft at the top and no useful data.

whoi rimuhosting.nz 

... returns the whole record with cruft at the top,
along with "%' for a line spacer.

whoi cam.ac.uk

... returns one blank line

-----
Standards?  We don't need no stinking standards!

Keith

-- 
Keith Lofstrom          keithl at keithl.com



More information about the PLUG mailing list