Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のbashスクリプトは、ユーザー名とパスワードで構成されたtxtファイルを取得し、それをスキャンして、それらの資格情報を使用してftpでホストに接続します。
次に、ncftpputを実行しようとします。転送したファイルに作成日を追加したい。
どうやってやるの?
PSEUDOCODE while read a b{ ncftpput -u $a -p $b hostFTP $folder_src $folder_dest }
私はに精通していませんncftpputが、コマンドを使用しdateてタイムスタンプを取得できます。
ncftpput
date
TIME_STAMP=`date +"%Y%m%d_%H%M%S"` # Becomes something like 20130219_115000
$TIME_STAMP結果のファイル名の一部として変数を使用するだけです。
$TIME_STAMP