[[シェルスクリプト]]

*説明 [#kb40900c]
wgetコマンドにて、FTPセッションを使用して、ファイルのダウンロードを実行するシェルスクリプトです。

*スクリプト [#fd1622cc]
 #!/bin/bash
 
 echo -n "FTP Server Name:"
 read FTPSVRNAME
 
 if [ ! -n "${FTPSVRNAME}" ];then echo "Plase Type FTP Server Name.";exit;fi
 
 echo -n "FTP User Name:"
 read FTPUSRNAME
 
 if [ ! -n "${FTPUSRNAME}" ];then echo "Plase Type FTP Server Name.";exit;fi
 
 echo -n "FTP User Pass:"
 read FTPUSRPASS
 
 if [ ! -n "${FTPUSRPASS}" ];then echo "Plase Type FTP Server Name.";exit;fi
 
 echo -n "Download Server Path:"
 read DLSVRPATH
 
 wget -N -r --output-file=./log/${FTPSVRNAME}_`date +%Y%m%d`.log --user=${FTPUSRNAME} --password=${FTPUSRPASS} ftp://${FTPSVRNAME}/${DLSVRPATH}

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS