[22483] in North American Network Operators' Group

home help back first fref pref prev next nref lref last post

Re: Something fishy at NetSol again...

daemon@ATHENA.MIT.EDU (Bill Fenner)
Tue Jan 5 17:14:43 1999

To: "Steven J. Sobol" <sjsobol@nacs.net>
cc: Wayne <wayne@domain.net>, NANOG <nanog@merit.edu>
In-reply-to: Your message of "Mon, 04 Jan 1999 21:37:47 PST."
             <19990105003747.54703@shell.nacs.net> 
Date: Tue, 5 Jan 1999 13:02:04 PST
From: Bill Fenner <fenner@parc.xerox.com>

This is a multipart MIME message.

--==_Exmh_-16387181970
Content-Type: text/plain; charset=us-ascii

In message <19990105003747.54703@shell.nacs.net>you write:
>The thing is, whois's standard out-of-the-box config doesn't default to
>whois.internic.net...

I wrote the following shell script to:
a) easily allow changing the default host (change the default "args=")
b) have shorthands for other servers like ARIN, etc.

  Bill



--==_Exmh_-16387181970
Content-Type: application/x-sh ; name="whois"
Content-Description: whois
Content-Disposition: attachment; filename="whois"

#!/bin/sh
#
# whois -- a shell script which allows the FreeBSD shortcut whois arguments
#  with an unmodified whois.
#
# I got so used to "whois -a" and typed it so often on my Sun that I just
# figured it would be easier to write a shell script which handled what
# I wanted to type.
#
# Bill Fenner, 22 Oct 1998
#
#
# Just in case we have an ancient whois that doesn't know about the Internic
args="-h rs.internic.net"

set -- `getopt h:adgpr $*`
if [ $? != 0 ]; then
	echo "Usage: $0 [-adgpr] [-h hostname] string"
	echo "  -a:	ARIN - number registry"
	echo "  -d:	Defense Department / .mil registry"
	echo "  -g:	Government / .gov registry"
	echo "  -p:	Pacific Rim / .jp registry"
	echo "  -r:	RIPE - european number and domain registry"
	exit 1
fi
for i
do
	case "$i"
	in
		-a)
			args="-h whois.arin.net"; shift;;
		-d)
			args="-h whois.nic.mil"; shift;;
		-g)
			args="-h whois.nic.gov"; shift;;
		-p)
			args="-h whois.apnic.net"; shift;;
		-r)
			args="-h whois.ripe.net"; shift;;
		-h)
			args="-h $2"; shift; shift;;
		--)
			shift; break;;
	esac
done
exec /usr/ucb/whois $args "$*"

--==_Exmh_-16387181970--



home help back first fref pref prev next nref lref last post