troubleshooting Question

ftp script

Avatar of Andy
Andy asked on
Unix OSLinuxFTP
2 Comments2 Solutions122 ViewsLast Modified:
Hello,

I'm from windows world :-)
Can someone tell me what does this script do.
Connecting to ftp server,authenticating and than what are this 3 lines:
binary
put $1 $2
rename $2 /output/$2
Transfering files to remote ftp?From where and what does it mean rename $2 /output/$2 ?

#!/bin/sh
HOST='ftp.example.com'
USER='yourid'
PASSWD='yourpw'

ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
binary
put $1 $2
rename $2 /output/$2
quit
END_SCRIPT
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros