You can use the -A flag of nmap and then pipe through to awk to print only the IP addresses you need. I have no Mac machines on my network but taking Windows machines as an alternate example:
nmap -A 192.168.0.0/24 | awk '/^Nmap scan report for/ { ip=$5 } /^Service Info:/ { split($0,map,":");if ( map[3] ~ "Mac OS X" ) { print ip } }'
Take the output of nmap and then, for each line starting with "Nmap scan report for", store the 5th space delimited field in the variable ip. Then when a line starts with "Service Info:", split the line into an array map based on ":" as the delimiter. Print the variable ip if the 3rd index of the map field pattern matches "Windows" (Change this to what ever text shows for Mac machines)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…