Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/iwhois-more-domains/iwhois.orig

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
switch($1){
case *@*
	person=`{echo $1|sed s/@.*//}
	machine=`{echo $1|sed s/.*@//}
	fn boilerplate { sed '1,/^$/d' $* }
case *.co.uk
	person=`{echo $1|sed s/@.*//}
	machine=whois.nic.uk
	fn boilerplate { sed '/^ +WHOIS database last updated at/,$d' $* }
case *
	person=$1
	machine=rs.internic.net
	fn boilerplate { sed '1,/^$/d' $* }
}
file=/tmp/iwhois$pid
echo ''$person'' | telnet -n tcp!$machine!whois > $file
x=`{ sed -n 's/.*Whois Server: (.*)/\1/p' $file }
switch($x){
case ''
	;
case *
	echo ''$person'' | telnet -n tcp!$x!whois > $file
}
boilerplate $file
rm $file

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.