how to use ftp(1) in batch mode

Wojciech Puchar wojtek at puchar.net
Sat Sep 1 17:02:12 UTC 2018


>> thank you. it works. actually even without netrc
>>
>> (echo command1;echo command2)|ftp ftp://user:password@server/
>
> If you need something slightly more robust, you may want to look
> at lang/expect, which uses send/expect sequences similar to kermit
> and uucp, but with more powerful options:

yes i've used it few times. thanks

>
> man expect(1):
>
> | Expect is a program that "talks" to other interactive programs according to a
> | script.  Following the script, Expect knows what can be expected from a program and
> | what the correct response should be.  An interpreted language provides branching and
> | high-level control structures to direct the dialogue.  In addition, the user can
> | take control and interact directly when desired, afterward returning control to the
> | script.
>
> cheers, Jamie
>
>


More information about the freebsd-hackers mailing list