I have a shell script which uses etherwake to wake up a machine on my local network. After the machine is awake, I\'m not sure of the IP address.
While trying to answer
I don't think there is a single command to do this. One hack would be to do a ping scan or a broadcast ping on the subnet and then query the arp table for the IP address of the MAC address. Obviously not an ideal solution. Example:
nmap -sP 192.168.1.0/24 >/dev/null && arp -an | grep | awk '{print $2}' | sed 's/[()]//g'
Here nmap will do a ping scan and populate your arp cache. Once the scan is done, the arp command can be used to print the arp table and then you pull out the IP address with grep/awk. You could try replacing nmap with a broadcast ping, but that probably isn't as reliable.