head	1.6;
access;
symbols;
locks; strict;
comment	@# @;


1.6
date	99.08.08.02.56.00;	author dunc;	state Exp;
branches;
next	1.5;

1.5
date	98.07.26.23.35.24;	author dunc;	state Exp;
branches;
next	1.4;

1.4
date	98.06.09.22.01.38;	author dunc;	state Exp;
branches;
next	1.3;

1.3
date	98.05.28.08.05.05;	author dunc;	state Exp;
branches;
next	1.2;

1.2
date	98.05.27.03.53.44;	author dunc;	state Exp;
branches;
next	1.1;

1.1
date	98.05.19.01.15.09;	author dunc;	state Exp;
branches;
next	;


desc
@Automatic ftp (uses expect)
@


1.6
log
@Email address updated
@
text
@#!/bin/sh
# $Id: aftp,v 1.5 1998/07/26 23:35:24 dunc Exp dunc $
# the next line is obeyed by sh but not expect \
exec expect -f "$0" -- "$@@"
puts "\$argv is $argv"
spawn ftp $argv
set timeout 60
expect \
{
  timeout {puts "timed out";exit}
  -nocase "unknown host" exit
  -nocase "connection refused" exit
  "Name"
} ;# expect
set timeout 20
exp_send anonymous\r
expect \
{
  "Service not available" exit
  "Password:" {}
} ;# expect
exp_send dunc@@apex.net.au\r
interact
@


1.5
log
@Standard startup; look for "Service not available" after sending anonymous
@
text
@d2 1
a2 1
# $Id: aftp,v 1.4 1998/06/09 22:01:38 dunc Exp dunc $
d22 1
a22 1
exp_send dunc@@dimstar.cv.com\r
@


1.4
log
@Enforce POSIXLY_CORRECT so Linux behaviour is same as Solaris
@
text
@d2 1
a2 1
# $Id: aftp,v 1.3 1998/05/28 08:05:05 dunc Exp $
d4 1
a4 1
POSIXLY_CORRECT="";export POSIXLY_CORRECT;exec expect "$0" "$@@"
d15 1
d17 5
a21 2
set timeout 20
expect Password:
@


1.3
log
@Get the Id line right
@
text
@d2 1
a2 1
# $Id: $
d4 2
a5 1
exec expect "$0" -- "$@@"
@


1.2
log
@Check for timeout, bad host, and conn refused
@
text
@d2 1
a2 1
# Id: $
@


1.1
log
@Initial revision
@
text
@d2 1
d7 7
a13 1
expect Name
@
