while read ip domain; do if [[ $ip == \#* ]]; then continue; else count=$(netstat -pant |grep $ip:110 |wc -l); if [ $count -gt 0 ]; then echo "$domain has $count connections"; fi; fi; done