1

HELP PLS - calling function in a while loop ends the loop ??

view story
linux-howto

http://www.unix.com – Hi, Need help figuring out why my function is exiting/breaking out of the while loop instead of completing the while loop? :wall: The script is as below: Code: #!/bin/bash pinghost() {   pinghost_RETVAL=""   if ping -c 1 $1 >/dev/null; then       if ssh $1 uname >/dev/null; then         pinghost_RETVAL=0       else         pinghost_RETVAL=1       fi   else       pinghost_RETVAL=1   fi   echo ${pinghost_RETVAL} } check_hosts() {   (HowTos)