Hello,

We are using the following command in a shell script to get data from a ftp
server:

ftp -in $server_ip < $ftp_commands

In the above example $server_ip is a variable holding the IP address of the
FTP server. The variable $ftp_commands holds the name of the file that
contains the FTP batch. Obviously it is not mandatory that we have to have
this information in variables.

The lines below are the content of the ftp_command batch file. I am adding
comments at each of the lines for explanation.

user cis cis # here the first cis is the userid for the connection and the
other
          # cis is the password for the connection
bin      # instruction to the FTP server to switch to the binary mode. Under
some
         # conditions this is needed for text file transfer also as we have
         # learnt the hard way !
cd ltbill       # changing directory in the FTP server
lcd /usr/itdata/ltbill  # changing directory in the FTP client machine
mget *  # requesting a transfer of all the files from the server
quit    # ending the FTP session


Hope this helps.

Goutam




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to