[2791] in linux-net channel archive
Re: automated FTP
daemon@ATHENA.MIT.EDU (Werner Koch)
Sun May 5 04:01:02 1996
Date: Sat, 4 May 1996 11:22:42 +0200 (MET DST)
From: Werner Koch <wernerk@luthien.me.eunet.de>
Reply-To: werner.koch@guug.de
To: "Boy of \"Destiny\"" <4bbkt@qlink.queensu.ca>
cc: linux-net@vger.rutgers.edu
In-Reply-To: <2.2.32.19960502182859.006a7448@qlink.queensu.ca>
On Thu, 2 May 1996, Boy of "Destiny" wrote:
> I'm trying to tell ftp to send a file from the command line and
> can't get it to work. What I'd like to do is have my dial up script, which
> works fine, update my homepage whenever I logon to my ISP. Any and all help
> is greatly appreciated.
Try this:
---------------
#!/bin/sh
#
# Load the homepages up to the www-server
#-------------------
ftp_server=ftp.geocities.com
ftp_account=anonymous
ftp_password=werner.koch@guug.de
ftp_directory=/pub/homestead
www_account=wk
www_password=secret
files=$(ls *.html *.gif *.zip 2>/dev/null)
(
echo user $ftp_account $ftp_password
echo bin
echo hash
echo cd $ftp_directory
for i in $files; do
echo put $i $i.$www_account.$www_password
done;
echo bye
) | ftp -n -v $ftp_server
-------------------------------
--
Werner Koch, Duesseldorf, phone: +49 211 489529, PGP keyID: 0C9857A5