Ending hanging dns-sd

Joined
Mar 10, 2015
Messages
2
Reaction score
0
Points
1
I'm making a script to find ip addresses on the server. Im a student working at a school and am in charge of inventory. I need to find an automated process to find the ip address of all the macs in the school because the dns server at the school doesn't return the correct addresses. The way that I am doing it currently is running the dns-sd -G command to find the ip addresses of all the macs. Is there a automated process to find the ip Addresses?

Currently, the command that I am using is
$ dns-sd -G -ipv4 hostname
this command gives me a output that is:
Timestamp A/R Flags if Hostname Address TTL
16:09:28.183 Add 2 0 rm301.78M696.nycboe.org. 0000:0000:0000:0000:0000:0000:0000:0000%<0> 60 No Such Record
16:09:28.187 Add 2 0 rm301.78M696.nycboe.org. 10.58.16.132 4502

When using using this command the script keeps runnning even after the output is given. Is there a useful way to end this hanging script without using ^C on my keyboard?
 
OP
A
Joined
Mar 10, 2015
Messages
2
Reaction score
0
Points
1
Ending hanging dns-sd

Do you have a suggestion about how I can check my output for null and also I'm not sure how to quit the script without using my keyboard.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top