Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to include ftp account information in script 2

Status
Not open for further replies.

cruel

Programmer
Aug 6, 2001
131
suppose I need a script that would invoke a FTP, log in the host and ftp the file I need,

....
ftp (remote host name)
( ???)
get (filename)
bye

how do I fill my account and password information in the (???)
Thank you very much!
 
FTP_SERVER=[hostname]
FTP_USER=[user]
FTP_PASS=[pass]

ftp -nv << END_FTP
open $FTP_SERVER
user $FTP_USER $FTP_PASS
[binary/ascii]
cd [some dir]
[get/put] [some file]
END_FTP Robert G. Jordan
Unix Sys Admin
Sleepy Hollow, Illinois U.S.A.
sh.gif


FREE Unix Scripts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top