Credit to Sim Wei Chieh
How to create shell script to auto ftp transfer
Objective:
- Create a new folder each time perform ftp transfer to target server with a set of files through wildcard.
Here is the code for autoftp.sh:
Time=$(date +"%F_%HH%MM%SS")
ftp -n < open
user
binary
prompt
cd /home//
mkdir timeoutput_top_error_log_$Time
cd timeoutput_top_error_log_$Time
lcd /root
mput setoffilenames*
bye
EOF
How to create shell script to auto ftp transfer
Objective:
- Create a new folder each time perform ftp transfer to target server with a set of files through wildcard.
Here is the code for autoftp.sh:
Time=$(date +"%F_%HH%MM%SS")
ftp -n <
user
binary
prompt
cd /home/
mkdir timeoutput_top_error_log_$Time
cd timeoutput_top_error_log_$Time
lcd /root
mput setoffilenames*
bye
EOF
No comments:
Post a Comment