このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
bash:script:02_check_remote_file [2014/06/05 06:50] – bash:スクリプト:リモートファイルチェック renamed to bash:script:02_check_remote_file matsui | bash:script:02_check_remote_file [2015/05/08 06:19] (現在) – matsui | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== 02 リモートファイルチェック ====== | ||
+ | < | ||
+ | chk_remote_file() { | ||
+ | if [ `ssh ${1} test -e ${2} ; echo \$?` != " | ||
+ | return 1 | ||
+ | fi | ||
+ | return 0 | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== リモートディレクトリチェック ====== | ||
+ | |||
+ | |||
+ | < | ||
+ | chk_remote_dir() { | ||
+ | if [ `ssh ${1} test -d ${2} ; echo \$?` != " | ||
+ | return 1 | ||
+ | fi | ||
+ | return 0 | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | {{tag> |