fuzzylizard Posted February 28, 2003 Report Share Posted February 28, 2003 Here's the deal. On my school account, I have a directory that I want to backup and upload to my web account. I want to create a shell script that will allow me to do the entire procedure with one command. Here is what I want to do: zip the required directory open ftp open my web account cd to the appropriate directory upload the zip file close the ftp session delete the zip file from my home account Zipping the file and deleting it are no problem. However, how do I control an ftp session once it is opened? The trick here is that I can't install any software as it is the universities server. Anyone got any ideas? Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted February 28, 2003 Report Share Posted February 28, 2003 Using ftp with a locally encrypted password http://www.linux.se/doc/HOWTO/Adv-Bash-Scr...tml#ENCRYPTEDPW Downloading a file through FTP http://www.linux.se/doc/HOWTO/Adv-Bash-Scr...pts.html#FTPGET Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted February 28, 2003 Report Share Posted February 28, 2003 Many software can be compiled to install in your home directory (./configure --prefix=$HOME). "Expect" can deal with input/output of any application, hence also ftp. Yves. Quote Link to comment Share on other sites More sharing options...
aru Posted February 28, 2003 Report Share Posted February 28, 2003 IMHO either "expect" or "plain ftp" are your best bet. Here you have tons of good hints and examples: Google Groups :: comp.unix.shell :: ftp scripts Quote Link to comment Share on other sites More sharing options...
aru Posted February 28, 2003 Report Share Posted February 28, 2003 NOT 100% RELATED but on the same issue: Check today's Linux Journal article: Synchronizing FTP Files with Perl It's a perl script :?, you can use it, or port it to bash :wink: Quote Link to comment Share on other sites More sharing options...
fuzzylizard Posted February 28, 2003 Author Report Share Posted February 28, 2003 Cool, thanks guys. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.