As a part of my task I have to ftp a file from one unix server onto the another UNIX server, I was able to do it inte ractively,
I jsut thought of coming up with a script, after some dragging the feet I wrote this script, But when I run this, it kind of
just hangs up and does nothing, I honestly don't know where this script is going wrong,
Any help is highly appreciated,
Cheers
The script is below
#!/bin/ksh
##################################
FTP_HOST='abc.xyz.com'
FTP_LOGIN='user'
FTP_PASSWD='passwd'
COMMAND='put'
LOCAL_DIR='/data_dir/source'
REMOTE_DIR='/prod_data_dir/target'
##########################################
ftp -inv $FTP_HOST <<END_SCRIPT
quote USER $FTP_LOGIN
quote PASS $FTP_PASSWD
$COMMAND $LOCAL_DIR/test.dat $REMOTE_DIR/test.dat
quit
END_SCRIPT
exit 0
Best regards
r9ronaldo
Forza Inter
I jsut thought of coming up with a script, after some dragging the feet I wrote this script, But when I run this, it kind of
just hangs up and does nothing, I honestly don't know where this script is going wrong,
Any help is highly appreciated,
Cheers
The script is below
#!/bin/ksh
##################################
FTP_HOST='abc.xyz.com'
FTP_LOGIN='user'
FTP_PASSWD='passwd'
COMMAND='put'
LOCAL_DIR='/data_dir/source'
REMOTE_DIR='/prod_data_dir/target'
##########################################
ftp -inv $FTP_HOST <<END_SCRIPT
quote USER $FTP_LOGIN
quote PASS $FTP_PASSWD
$COMMAND $LOCAL_DIR/test.dat $REMOTE_DIR/test.dat
quit
END_SCRIPT
exit 0
Best regards
r9ronaldo
Forza Inter