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

Re: Script of the ftp



On Friday 20 July 2007 12:42, Márcio Luciano Donada wrote:
> This is for the snakes in scripts. I am making one scripts that it
> uses the bow will be for sending archives of different varios
> directory for ftp, only that I am having a problem of
>
> My scripts is:
>
> !/bin/bash
> users=`ls /home/relatorios/`
> for user in $users; do
>     cd /home/relatorios/$user
>     ftp -n 200.228.43.6<<End-Of-Session
>     user blablablabla "blabla"
>     bin
>     prompt
>     cd /home/$user/ARQUIVOS
>     bye
>     EOF
> done
>
> erro is: end of file expetend,

Bob has already pointed out the mismatch between End-Of-Session
and EOF.  The other change I would make would be to use "expect"
to actually wait for prompts rather than sending username and
password before the FTP program was ready.

--Mike Bird



Reply to: