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?
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?