Bugfix: Ignore "normal" lines that include the string "20"
#!/bin/bash
-for host in `nmblookup -s /dev/null -S workgroup | grep "20" | awk '{print $1}'`; do
+for host in `nmblookup -s /dev/null -S workgroup | grep "<20>" | awk '{print $1}'`; do
IPS=""
for ip in `nmblookup -s /dev/null $host | awk '{print $1}'`; do
IPS="$IPS $ip"
