[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hands off ftp
Try the expect extentions to TCL. It's the only way I know how to
completely automate something like FTP from a script.
Shawn
bob@acm.org wrote:
> I want ot do ftp operations with a script, maybe kicking off
> that script from a cron job.
>
> I tried things like...
>
> ftp < scriptfile >out1 >&out2
>
> Where scriptfile is the usual sort of ftp session....
>
> open overthere.com
> bobby
> mypassword
> cd /pub/upload/directory
> lcd /home/bobby/myjunk
> put latest.ad.greatest.tgz
> cd /pub/download
> get newestpackage.tgz
> close
> quit
>
> The thing runs for a few seconds and then says
> ...stopped (ttyp output) or words to that effect.
>
> If I type
> ftp < scriptfile
> and wait, The thing works, but I have to press <ENTER> a couple
> of times.
>
> I understnad that I have not surrogated all the I/O, but what have
> I missed?
>
> Thanks for any answers in advance.
> ---> RGB <---