[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automatic ftping in a script - how?



Hi Frankie,
> > > > I want to write a script in which some files are automatically ftped to
> > > > another machine (a username and password needs to be entered).  Is there
> > > > a nice utility which will enable me to do this?
> > >
> > > check out the ncftpput utility
> > No need for any utility apart from plain ftp:
> > 
> > #!/bin/bash
> > #
> > ftp <<EOF
> > open target.host.net
> > user youruser
> > pass yourpassword
> > bin
> > cd /where/to/put/the/file
> > put your_local_file
> > bye
> > EOF
> is there any way to return control to the user during the process
> without ending ftp? (eg if the files wasn't there then they would have
> to get it manually or sthg?)
This gets more complicated...  I think looking into expect will be
neccessary then. But it might(!) be possible to have a shell script
talking to ftp and responding to it's answers...

Bye, Tino.


Reply to: