[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: ftp script
- From: Ahbaid Gaffoor <ahbaidg guyana net gy>
- To: redhat-list redhat com
- Subject: Re: ftp script
- Date: Wed, 21 Apr 1999 13:44:14 -0500
Hi Charles,
thanks, works like a charm at home...
however I don't seem to have "spawn" on the linux box I need to do this on...
any idea which RPM on the redhat CD has it?
thanks again,
Ahbaid.
Charles Galpin wrote:
> Expect will do this nicely
>
> #!/usr/bin/expect
>
> spawn ftp 10.0.0.9
> expect ):
> send ahbaid\r
> expect Password:
> send ****\r
> expect ftp>
> send "cd some/dir\r"
> expect ftp>
> send "put a.txt\r"
> expect ftp>
> send "get b.txt\r"
> expect ftp>
> send "get c.txt\r"
> expect ftp>
> send quit\r
>
> hth
> charles
> ===== Original Message from Ahbaid Gaffoor <redhat-list redhat com> at
> 4/19/99 4:34 pm
> >Hello,
> >
> >I have to ftp a lot of files from a server,
> >
> >I have a list of the files,
> > is there a way to write a scrip which:
> >
> >a) connects to the ftp addres
> >b) logs in via. username and password
> >c) downloads each file (I'll use grep and awk to build this part)
> >d) logs off
> >
> >basically something like
> >
> >ftp 10.0.0.9
> >username: ahbaid
> >password: ****
> >get a.txt
> >get b.txt
> >get c.txt
> >quit
>
> --
> PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
> http://www.redhat.com http://archive.redhat.com
> To unsubscribe: mail redhat-list-request redhat com with
> "unsubscribe" as the Subject.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]