From owner-FreeBSD-users-jp@jp.freebsd.org  Wed Dec 18 22:18:50 1996
Received: by jaz.jp.freebsd.org (8.8.4+2.7Wbeta4/8.7.3) id WAA07275
	Wed, 18 Dec 1996 22:18:50 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.4+2.7Wbeta4/8.7.3) with ESMTP id WAA07270
	for <FreeBSD-users-jp@jp.freebsd.org>; Wed, 18 Dec 1996 22:18:50 +0900 (JST)
Received: by uno.sat.t.u-tokyo.ac.jp (8.8.4/8.7.3) with ESMTP
	id WAA01865; Wed, 18 Dec 1996 22:14:47 +0900 (JST)
Received: from localhost (localhost [127.0.0.1]) by lucy.peanuts (8.7.5/8.7.3) with ESMTP id WAA01848; Wed, 18 Dec 1996 22:10:02 +0900 (JST)
Message-Id: <199612181310.WAA01848@lucy.peanuts>
To: FreeBSD-users-jp@jp.freebsd.org, fuchino@twave.co.jp
From: nosuzuki@LabRecG-2.lab.nig.ac.jp (Norio Suzuki)
In-Reply-To: Your message of "Tue, 17 Dec 1996 17:15:42 +0900"
References: <199612170815.RAA14903@mail.twave.co.jp>
X-Mailer: Mew version 1.54 on Emacs 19.28.1, Mule 2.3
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
	boundary="--Next_Part(Wed_Dec_18_22:00:07_1996)--"
Content-Transfer-Encoding: 7bit
Date: Wed, 18 Dec 1996 22:06:11 +0900
Reply-To: nosuzuki@LabRecG-2.lab.nig.ac.jp
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=19]
X-Sequence: FreeBSD-users-jp 7648
Subject: [FreeBSD-users-jp 7648] Re: [Q]autoftp script
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

----Next_Part(Wed_Dec_18_22:00:07_1996)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

FTP$B$N<+F02=$G$9$,!"$$$m$s$JJ}K!$,$"$k$b$N$G$9$M!#$3$s$J$K$b$"$k$b$N$+(B
$B$H6C$$$F$$$^$9!#(B

$B$b$H$b$H$O!"(BC $B%7%'%k%9%/%j%W%H$G$H$$$&$3$H$@$C$?$N$G$9$,!"(Bperl$B$G$b$G$-(B
$B$^$9$H$$$&Nc$r!#(B($B;d$K$O!"(Bperl *$B$7$+(B* $B%9%/%j%W%H$,=q$1$J$$$N$G!#(B)

perl ver.5 $B0J9_$G$O!"$$$m$$$mJXMx$J(Bmodule$B$,H/I=$5$l$F$$$^$7$9!#$3$l$r(B
$B;H$&$HFq$7$$ItJ,$r9M$($:$K%9%/%j%W%H$r4JC1$K:n$l$^$9!#:#2s$N$h$&$K(B FTP 
$B$r07$$$?$$$N$G$9$H!"(BNet::FTP $B$H$$$&(Bmodule$B$G<B8=2DG=$G$9!#4JC1$JNc$O!"(B
$B<!$N(B part $B$N$h$&$K$J$j$^$9!#(B

$B$3$NB>$K$O!"(BPOP$B$d(BNNTP$B$r07$&$3$H$N$G$-$k$b$N$,$"$j$^$9!#(B
--
$BNkLZ(B $B65O:(B
$BAm9g8&5fBg3X1!Bg3X(B $B@8L?2J3X8&5f2J(B $B0dEA3X@l96(B
($B9qN)0dEA3X8&5f=j(B $B9=B$@)8f8&5f<<(B)
E-Mail: nosuzuki@wormhole.lab.nig.ac.jp
Home page: http://wormhole.lab.nig.ac.jp/

----Next_Part(Wed_Dec_18_22:00:07_1996)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

#!/usr/local/bin/perl
use Getopt::Std;
getopt('phur');
# h: host name
# u: user name
# p: password
# r: remote dir
die "Need both user name and password\n" unless (defined($opt_u) && defined($opt_p));

use Net::FTP;
$opt_h = "hostname";
$opt_r = "remote_dir";

print "Contect to $opt_h...";
die "Cant't connect\n" unless ($ftp = Net::FTP->new($opt_h));
print "Login $opt_u...";
die "Can't login\n" unless ($ftp->login($opt_u,$opt_p));
die "Can't FTP::chdir to $opt_r\n" unless ($ftp->cwd($opt_r));
print "\nGet remote dir\n";
print $ftp->dir;
foreach $file (@get_list) {
    print "Get $file ...";
    if ($ftp->get($file)) {
	print "Done\n";
    } else {
	print "Error\n";
    }
}

foreach $file (@put_list) {
    print "Put $file ...";
    if ($ftp->put($file)) {
	print "Done\n";
    } else {
	print "Error\n";
    }
}
$fit->quit;

----Next_Part(Wed_Dec_18_22:00:07_1996)----
