How to resolve netbios names with osx
As you mentioned, smbutil lookup will resolve the name to an IP address:

$ smbutil lookup qx-2000
Got response from 10.0.1.21
IP address of qx-2000: 10.0.1.21


We can extract the IP address from this output:

$ smbutil lookup qx-2000 2&gt;&amp;1 | tail -n 1 | cut -d : -f 2
 10.0.1.21


Then we can use that in our argument to ping:

$ ping $(smbutil lookup qx-2000 2&gt;&amp;1 | tail -n 1 | cut -d : -f 2)
PING 10.0.1.21 (10.0.1.21): 56 data bytes
64 bytes from 10.0.1.21: icmp_seq=0 ttl=128 time=4.823 ms
64 bytes from 10.0.1.21: icmp_seq=1 ttl=128 time=7.373 ms
64 bytes from 10.0.1.21: icmp_seq=2 ttl=128 time=4.820 ms
...