Help on a script to push files once a day

Hello!

Please I need some help on writing a script to push files from one server to the other once a day, everyday. I know that I can use this script on a crontab to send the files , but I am not sure how to start writing it, the actual script.

I could start by declaring some variables:

HOST=192.168.1.1.
USER=ndo_ftp

---------- Post updated at 02:56 PM ---------- Previous update was at 02:34 PM ----------

will this code be write?

HOST=192.168.1.1
USER=ndo_ftp
PASSWD=123456
FILE=/dir/subdir/file.txt

ftp -n $HOST
quote user $USER
quote pass $PASSWD
put $FILE

Have you tried that script? Does it work? Does it give you errors?

this is the output:

./ftp_ndo 
Connected to 192.168.0.85.
220 moneta FTP server ready.
ftp> 

The following couple examples, and there are more, should help you with syntax.

How send a file from UNIX to Windows with FTP | Unix Linux Forums | Shell Programming and Scripting

Shell Scripting for creating ftp and transfer file | Unix Linux Forums | Shell Programming and Scripting

after inserting

<<END_SCRIPT

into the script, I am now having the following error:

./ftp_ndo 
/tmp/fr/vconf11: No such file or directory

but this file

vconf11

is there