Re: Need help.

From: Barry Margolin (barry.margolin_at_level3.com)
Date: 07/15/03


Date: Mon, 14 Jul 2003 22:29:02 GMT

In article <cef5d0a6.0307141215.13019673@posting.google.com>,
parth <parth002000@yahoo.com> wrote:
>I am writting a korn shell script to ftp files to another box. But the
>catch is that I have to put file every 30 seconds, without
>disconnecting ftp.
>
>I am using put (put $filename)but unable supply new filename as ftp
>don't have any command for looping..

One way to do this is with a coprocess. Start a coprocess running ftp, and
then have the main process go into a loop sending "put $filename" to the
pipe to the coprocess.

Other solutions would be to write the script in Perl using the Net::FTP
module, or in Expect.

-- 
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


Relevant Pages

  • wScript.Shell Problems
    ... I am in the process of building a script to FTP files to another ... The two variables being sent to the Function just contain FTP Commands ... Dim strFile, objTempFldr, objFile, objRegExp ... Set objFSO = CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Re: nec. ports to access shared folder ?
    ... are you running nlb (multiple servers in a cluster) on that site? ... how do you get the ftp files into the wwwroot and other website ... create multiple ftp instances and point each one to one of the website ...
    (microsoft.public.windows.server.networking)
  • Re: ftp assistance requested
    ... > I have been tasked with creating some scripts to ftp files to various ... > The vendor has been no help. ... Sounds to me like the site closed normal ftp and opened secure ftp, ...
    (comp.unix.solaris)
  • Re: SFTP
    ... kpg wrote: ... > I use the wininet API to FTP files. ...
    (microsoft.public.vb.general.discussion)
  • Re: Looking for list of return codes from FTP on Aix 4.2.1.0
    ... I am looking for a list of return codes returned by the standard FTP utility ... : under AIX 4.2.1.0. ... I am using an embedded FTP call in a Korn shell script. ...
    (comp.unix.aix)

Loading