configuration file

i am trying to use a configuration file to FTP some files.. i am not sure how to call or use a configuration file in script.
can anybody help

Do you mean a configuration file for the ftpd daemon like inetd.conf?
Or maybe /etc/ftpd/ftpaccess

What EXACTLY are you trying to do?

i am trying to ftp files from one server to other. i have prepared all files on server1 and I have to provide site name, user id and password in the script to FTP files to another server.

One way to do this via sftp is

sftp -b $SERVER_NAME << EOF
get file1
get file2
.....
EOF

If you do not have ssh key stored between two servers it will prompt you for password. Also not that this assumes you are connecting to other server with same name where you are logged in now.

For ftp in a shell script-

  1. search the forums - the FAQ has many great examples
  2. bare bones "here document" you can use in a shell script:
ftp -n <<EOJ
open server2
user myusername mypasswd
put myfile
bye
EOJ

is it EOF or EOJ.. i tried doing it and its not working !! i cannot find an example for it ..