Listmates, I have run into another bash caveat I don't understand. Evidently, the ssh call I am making is returning an "exit" following execution of the first pass and never getting to the rest of the hostnames I want to test. It is part of a script that will take a new or modified file and scp it to the same directory on my list of remote hosts. The relevant portions of the script are: FILENAME=`basename $1` if [[ ${DIRNAME:0:1} == '/' ]]; then DIRNAME=`dirname $1` else DIRNAME=${PWD}/`dirname $1` fi while read DESTHOST; do if ssh $DESTHOST '[[ -d "$DIRNAME" || $(mkdir -p "DIRNAME") -eq 0 ]]'; then if scp ${DIRNAME}/${FILENAME} $DESTHOST:${DIRNAME}/${FILENAME}; then echo -e "Transfer to $DESTHOST ${lightgreen}[OK]${nc}" else echo -e "Transfer to $DESTHOST ${red}[Failed]${nc}" fi else echo "$DESTHOST is Unavailable" fi done < /home/david/linux/scripts/network/dsshosts 23:22 alchemy:~> cat /home/david/linux/scripts/network/dsshosts ecstasy killerz nirvana nemesis zion bonza.rbpllc.com providence.rbpllc.com The irrelevant, but curious parts of the script are: red='\e[0;31m' # ${red} lightgreen='\e[1;32m' # ${lightgreen} nc='\e[0m' # ${nc} What happens is the script runs through host ecstasy and then finishes. If I comment the 'if ssh $DESTHOST...' or replace it with anything else, it runs through all the hosts as expected. So for reasons I don't understand, the 'if ssh...' call is making it exit. I have tried every variant I can think of. I tried putting the ssh check in a function: ckdestdir () { return $(ssh $1 '[[ -d "$DIRNAME" || $(mkdir -p "DIRNAME") -eq 0 ]]') } No joy. I tried putting the call in a subshell: if { ssh $DESTHOST '[[ -d "$DIRNAME" || $(mkdir -p "DIRNAME") -eq 0 ]]' }; then No joy, same result every time. It runs through ecstasy and quits. (at least that is consistent). So I'm stumped as to which part of man bash I'm not complying with? Any help to cure my present CRI would be greatly appreciated. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org