creating script to perform a nslookup on all servers


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers creating script to perform a nslookup on all servers
# 8  
Old 06-23-2010
If this is a local DNS which you have permissions to look at it, you can use nslookup in interactive mode to view the DNS records. See "man nslookup" and review the "ls" command. The "ls -t PTR domain_name" seems to be relevant when compared with just "ls domain_name". There is much variation in the syntax an behaviour of "nslookup" and there is no substitute for reading the manual and trying out read-only commands. The command "nslookup" is being phased out in favour of "dig" but many mainstream Operating Systems still have "nslookup".

I have not been successful in scripting this type of nslookup for multiple enquiries because of the unusual way nslookup drives the terminal but for a single enquiry standard output redirect "> filename" works from the command line in my version.

In any enquiries about machine-specific elements such as comms or hardware it always helps to state the precise Operating System and version.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Nslookup on a variable inside script not working

I am new at scripting. I have a file that each line is the shortname for a server. ie - Server1 Server2 Server3 I want to read in that file, do a nslookup and print the FQDN to a file. I added an echo statement to make sure my variable was being read and changing. But the nslookup... (5 Replies)
Discussion started by: kellyhkc
5 Replies

2. Shell Programming and Scripting

How to perform floating division in shell script?

I want to perform the below division operation in shell script and round the value. val1=6000 val2=5000 res=val1/val2 ----> 1.2---> Round to 2 Please help. (3 Replies)
Discussion started by: vel4ever
3 Replies

3. UNIX for Dummies Questions & Answers

How to perform string replace in shell script?

I have value like ABCDEF,BBCCDD in a shell variable, now i would like to have ABQWEF,BBQWDD in the same shell variable. How can i replace the char at position 3&4 with QW in shell script? (3 Replies)
Discussion started by: vel4ever
3 Replies

4. Shell Programming and Scripting

Script: nslookup few hosts at once

Hi Expert, Is there anyway for me to nslookup more than one host at one time, instead of doing it one by one. Thank you. (2 Replies)
Discussion started by: regmaster
2 Replies

5. Shell Programming and Scripting

shell script to take input from a text file and perform check on each servers and copy files

HI all, I want to script where all the server names will be in a text file like server1 server2 server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 Replies

6. Shell Programming and Scripting

nslookup script but having syntax issues

Hi All i am creating a script to perform a nslookup on a specified host (so in otherwords it will be: zong(script name) 172.x.x.10(ip adress). i am scripting in tcsh. unfortunately i think i am doing something wrong as it keeps giving me syntax error. can someone help? @ num=1 set arg='ping... (2 Replies)
Discussion started by: brian112
2 Replies

7. Shell Programming and Scripting

nslookup for reverse lookups on multiple servers

Hi all i need help :) i need to create a script (tcsh) to do a nslookup on all my hosts to see which ones do not have reverse lookup..etc. can someone please help? (1 Reply)
Discussion started by: brian112
1 Replies

8. Shell Programming and Scripting

Trying to perform encryption through script

Hi, I have a small basic script encryption.sh as shown below. All I am trying to do is to encrypt a file which is passed through the script. It works fine when I execute this script directly from command line via putty or telnet but it does not work when I call this script in an... (3 Replies)
Discussion started by: simi28
3 Replies

9. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

Hi, Can someone help me with creating a bash shell script. I need to create a script that gets a positive number n as an argument. The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies

10. Shell Programming and Scripting

NSLOOKUP script

Hi Anyone know of a quick and simple way to script an NSLOOKUP's from a list/text file? Thanks, Gav (1 Reply)
Discussion started by: gavcollins
1 Replies
Login or Register to Ask a Question
rpc.nisd_resolv(1M)					  System Administration Commands				       rpc.nisd_resolv(1M)

NAME
rpc.nisd_resolv, nisd_resolv - NIS+ service daemon SYNOPSIS
rpc.nisd_resolv [-v | -V] [ -F [-C fd]] [-t xx] [-p yy] DESCRIPTION
rpc.nisd_resolv is an auxiliary process which provides DNS forwarding service for NIS hosts requests to both ypserv and rpc.nisd that are running in the NIS compatibility mode. It is generally started by invoking rpc.nisd(1M) with the -B option or ypserv(1M) with the -d option. Although it is not recommended, rpc.nisd_resolv can also be started independently with the following options. This command requires that the /etc/resolv.conf file be setup for communication with a DNS nameserver. The nslookup utility can be used to verify communication with a DNS nameserver. See resolv.conf(4) and nslookup(1M). OPTIONS
-F Run in foreground. -C fd Use fd for service xprt (from nisd). -v Verbose. Send output to the syslog daemon. -V Verbose. Send output to stdout. -t xx Use transport xx. -p yy Use transient program# yy. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ SEE ALSO
nslookup(1M), rpc.nisd(1M), resolv.conf(4), attributes(5) NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.10 12 Dec 2001 rpc.nisd_resolv(1M)