From owner-freebsd-hackers@freebsd.org Sat Sep 1 17:02:11 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA2B8FF4EE5 for ; Sat, 1 Sep 2018 17:02:11 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "puchar.net", Issuer "puchar.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A0A873923 for ; Sat, 1 Sep 2018 17:02:10 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id w81H1WXm080334 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 1 Sep 2018 19:01:32 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id w81H1RQU080331; Sat, 1 Sep 2018 19:01:27 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Date: Sat, 1 Sep 2018 19:01:27 +0200 (CEST) From: Wojciech Puchar To: Jamie Landeg-Jones cc: wojtek@puchar.net, eugen@grosbein.net, freebsd-hackers@freebsd.org Subject: Re: how to use ftp(1) in batch mode In-Reply-To: <201809011226.w81CQDD8016065@donotpassgo.dyslexicfish.net> Message-ID: References: <5B87F083.6080804@grosbein.net> <201809011226.w81CQDD8016065@donotpassgo.dyslexicfish.net> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2018 17:02:12 -0000 >> 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 > >