Link to home
Start Free TrialLog in
Avatar of Andy M
Andy MFlag for Croatia

asked on

ftp script

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
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial