[BusyBox 0000907]: More scriptable nslookup

bugs at busybox.net bugs at busybox.net
Sat Jun 17 10:34:43 UTC 2006


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=907 
====================================================================== 
Reported By:                zenon
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   907
Category:                   New Features
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             06-16-2006 20:55 PDT
Last Modified:              06-17-2006 03:34 PDT
====================================================================== 
Summary:                    More scriptable nslookup
Description: 
It would be nice if the output used unique tags. As it is, "Address" is
used twice and that complicates scripting:

root at OpenWrt:~# nslookup www.busybox.net 166.70.99.138
Server:     codepoet.org
Address:    166.70.99.138

Name:       www.busybox.net
Address:    140.211.166.41

Something like 
IP=`nslookup www.busybox.net 81.169.159.148 |grep Address |sed 's/Address:
*//'` 
ends up with $IP containing the server's address. Substituting "Server IP"
for the first "Address" would simplify life and increase usability. 
 
(BTW, while creating the sample output above, I noticed that your primary
name server has no PTR record: 
$ host 166.70.154.59
Host 59.154.70.166.in-addr.arpa not found: 2(SERVFAIL)
)


====================================================================== 

---------------------------------------------------------------------- 
 bernhardf - 06-17-06 03:34  
---------------------------------------------------------------------- 
No, this would just increase the size needlessly.

Better fix your script:
./busybox nslookup www.busybox.net 166.70.99.138 | ./busybox sed -e
'1,/^Name/d;s/Address:[ \t]*//'
140.211.166.41 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-16-06 20:55  zenon          New Issue                                    
06-16-06 20:55  zenon          Status                   new => assigned     
06-16-06 20:55  zenon          Assigned To               => BusyBox         
06-17-06 03:34  bernhardf      Status                   assigned => closed  
06-17-06 03:34  bernhardf      Note Added: 0001429                          
======================================================================




More information about the busybox-cvs mailing list