How can I replace the nmblookup command on Lion? Possible Duplicate:
  Where is nmblookup in Lion?  




In Snow Leopard, I used to use the command
nmblookup -U 172.16.0.10 -R domainPC | grep '&lt;00&gt;' | awk '{print $1}'
Blindly upgrading to Lion, I didn't realize that Apple removed SMB I am now in trouble.

Is there anyway to replace it with an alternative? I see there is smbutil lookup [hostname], but I am not sure if I can add a gateway like I did with nmblookup.
Did you have a look at the man page?  

Shouldn't smbutil lookup [-w host] name do the job?


 Global options are as follows:
 -h      Print a short help message.
 -v      Verbose output.
 The commands and local options are:
 help command
         Print usage information about command.
 lookup [-w host] [-t node_type] [-e] name
         Resolve the given name to an IP address.  The NetBIOS name server can be directly specified via
         the -w option. The NetBIOS name type can be specified via the -t, the default is to lookup file
         servers. For a complete list of name type please see "http://support.microsoft.com/kb/163409".
         The NetBIOS names will be unpercent escaped out if the -e option is specified.
 status [-ae] hostname
         Resolve given hostname (IP address or DNS name) to NetBIOS workgroup and system name. All Net-
         BIOS names will be displayed if the -a option is specified. All NetBIOS names will be percent
         escaped out if the -e option is specified.



For me this worked (replacing your example):  

smbutil lookup -w 172.16.0.10 -e domainPC | awk '/IP address of/ {print $5}'