check host down or up with ping command line

for i in {01..36}; do ping -c 1 tancn$i.cm.cluster &> /dev/null && echo success || echo pcn$i fail ; done