Bind Version Info Script

Joseph S D Yao jsdy at cospo.osis.gov
Wed Nov 22 18:28:30 UTC 2000


On Wed, Nov 22, 2000 at 01:06:43PM -0500, Riskable wrote:
...
> #!/bin/sh
> # description: Find out what version of BIND a server is running
> # Written by Riskable (YouKnowWho at YouKnowWhat.com)
> # Version 1.0: Initial distribution
> # Feel free to distribute as you see fit
> 
> nslookup -q=txt -class=chaos << EOF | grep VERSION
> server $1
> version.bind
...

No "EOF" string.  ;-(

Why not:

nslookup -q=txt -class=chaos version.bind $1 | grep VERSION

which has the added benefit of not generating even more error messages
if you leave off the server argument, but instead using your default
server.

Or, for those among us who hate 'nslookup':

dig txt chaos version.bind @$1 | grep VERSION

which generates an error message if you give it a bad or no server
name, but still gives you the version.  Better:

	server="$1"
	if [ ! -z "$server" ]; then server="@$server"; fi
	dig txt chaos version.bind $server | grep VERSION

;-) ;-) ;-) ;-) ;-)

Happy U.S.A. Thanksgiving, all!

-- 
Joe Yao				jsdy at cospo.osis.gov - Joseph S. D. Yao
COSPO/OSIS Computer Support					EMT-B
-----------------------------------------------------------------------
This message is not an official statement of COSPO policies.



More information about the bind-users mailing list