chk_remote_file() { if [ `ssh ${1} test -e ${2} ; echo \$?` != "0" ]; then return 1 fi return 0 }
chk_remote_dir() { if [ `ssh ${1} test -d ${2} ; echo \$?` != "0" ]; then return 1 fi return 0 }