From owner-freebsd-questions@FreeBSD.ORG Mon Jan 30 08:50:57 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BA6716A420 for ; Mon, 30 Jan 2006 08:50:57 +0000 (GMT) (envelope-from chris@i13i.com) Received: from admin.i13i.com (admin.i13i.com [66.90.92.83]) by mx1.FreeBSD.org (Postfix) with SMTP id E5AD543D48 for ; Mon, 30 Jan 2006 08:50:56 +0000 (GMT) (envelope-from chris@i13i.com) Received: (qmail 27304 invoked from network); 30 Jan 2006 08:56:51 -0000 Received: from mail.i13i.com (HELO webmail.i13i.com) (208.53.187.133) by admin.i13i.com with SMTP; 30 Jan 2006 08:56:51 -0000 Received: from 201.155.124.198 (SquirrelMail authenticated user chris@i13i.com) by webmail.i13i.com with HTTP; Mon, 30 Jan 2006 02:56:51 -0600 (CST) Message-ID: <1608.201.155.124.198.1138611411.squirrel@webmail.i13i.com> In-Reply-To: <20060130034503.80452.qmail@web37106.mail.mud.yahoo.com> References: <20060130034503.80452.qmail@web37106.mail.mud.yahoo.com> Date: Mon, 30 Jan 2006 02:56:51 -0600 (CST) From: chris@i13i.com To: "Angelo Christou" User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-questions@freebsd.org Subject: Re: FTP Automate Shell Script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 08:50:57 -0000 why not try scp instead of ftp ? > Hello. I am using FreeBSD 6.0 and Bash as my shell. I > am following a tutorial to create a shell script to > copy some files. It works perectly exept for 2 points. > > Here is the article - > > http://www.quepublishing.com/articles/printerfriendly.asp?p=170517 > > Here is the script - > > #!/bin/sh > > temp="/tmp/$(basename $0).$$" ; trap "/bin/rm -f > $temp" 0 > targetdir="remote-dir" > remote="laptop.intuitive.com" > > echo "taylor" > $temp > echo "cd $targetdir" >> $temp > > for file in * > do > if [ -f $file ] ; then > echo "put $file $file" >> $temp > else > echo "skipping $file: not a file." >&2 > fi > done > > echo "quit" >> $temp > > ftp $remote < $temp > > exit 0 > > One problem is that the password must be entered > manually, I have spent a good part of the day > experimenting but can't seem to automate this. Can the > password be entered using the script? > > The other problem is that it copies the actual file. > What command would I look at to copy only images > (.jpg) for example? > > Thanks in advance. > Ang. > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" >