It is pinging to see whether 'pgl.yoyo.org' is reachable or not. If ping fails (with grep not finding the numbers) it will fail to populate the variable $pingtest and hence not try to wget. Play with it at the command line and you can see what happens when grep won't find.... (echo $pingtest won't show anything then) Sorry for the "iif" it happened when I was copying and pasting. Here examples: Code: # ADLISTHOST="pgl.yoyo.org" # pingtest=$(ping -c 1 $ADLISTHOST | grep "193.110.91") # echo $pingtest PING pgl.yoyo.org (126.96.36.199): 56 data bytes 64 bytes from 188.8.131.52: icmp _seq=0 ttl=46 time=169.7 ms # #see it is not null now we try to get it null # #there is no number 8 so lets try it # pingtest=$(ping -c 1 $ADLISTHOST | grep "8") # echo $pingtest # #ahh see null !! no reason for wget !