#!/bin/sh
##########################################
# sftp download file
# create by maxj
# 2017/02/06
##########################################
if [ $# != 5 ];then
echo "usage:[ftpIp:$1 user:$2 ftppwd:$3 ftpDir:$4 localDir:$5]"
exit -1
fi
ftpIp=$1
ftpUser=$2
ftpPwd=$3
ftpDir=$4
localDir=$5
#if [ -f $4 ];
#then
# echo "no such file or directory"
#fi
sftp $2@$1 <<EOF
get $4 $5
quit
EOF
Shell sftp下载文件
最新推荐文章于 2024-09-12 11:39:15 发布