OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [example/] [ftp-rfc] - Blame information for rev 1772

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!../expect --
2
 
3
# ftp-rfc 
4
# ftp-rfc -index
5
 
6
# retrieves an rfc (or the index) from uunet
7
 
8
exp_version -exit 5.0
9
 
10
if $argc!=1 {
11
        send_user "usage: ftp-rfc \[#] \[-index]\n"
12
        exit
13
}
14
 
15
set file "rfc$argv.Z"
16
 
17
set timeout 60
18
spawn ftp ftp.uu.net
19
expect "Name*:"
20
send "anonymous\r"
21
expect "Password:"
22
send "expect@nist.gov\r"
23
expect "ftp>"
24
send "binary\r"
25
expect "ftp>"
26
send "cd inet/rfc\r"
27
expect "550*ftp>" exit "250*ftp>"
28
send "get $file\r"
29
expect "550*ftp>" exit "200*226*ftp>"
30
close
31
wait
32
send_user "\nuncompressing file - wait...\n"
33
exec uncompress $file
34
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.