====== 02 リモートファイルチェック ====== 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 } {{tag>bash}}