cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Using cURL to backup switches

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 3 May 2002 00:25:58 +0200 (MET DST)

On Thu, 2 May 2002, Warrick FitzGerald wrote:

> I would like to use cURL to login into a range of devices using Telnet and
> execute the necessary command to backup the device to a tftp server
> somewhere on my nextwork, is cURL the best way to do this (can cURL do this
> ?)? or should I be using something like Expect ?.

cURL can't even begin to compete with Expect when it comes to do automatic
stuff that emulates a range of user commands/inputs (and acts differently
depending on command output). curl's telnet support is limited to sending and
receiving data from stdin to network and from network to stdout.

> I'm sure their are a number of ways to accomplish this, I guess what I'm
> trying to figureout is, if this is the best way to accomplish what I'm
> trying to do (whithout sonding hours learning the hard way :) -- )?

You're looking for Expect. You could of course use curl from within your
Expect script, but then again you can use pretty much any telnet client. The
choice is yours.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.net
Received on 2002-05-03