From owner-freebsd-questions@FreeBSD.ORG Sun Dec 21 10:52:40 2003 Return-Path: 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 9F10616A4CE for ; Sun, 21 Dec 2003 10:52:40 -0800 (PST) Received: from lakemtao04.cox.net (lakemtao04.cox.net [68.1.17.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FAE443D5A for ; Sun, 21 Dec 2003 10:52:39 -0800 (PST) (envelope-from bsdguru@cox.net) Received: from beastie.cornpropst.net ([68.110.240.24]) by lakemtao04.cox.netESMTP <20031221185239.TMZA19895.lakemtao04.cox.net@beastie.cornpropst.net> for ; Sun, 21 Dec 2003 13:52:39 -0500 From: Trevor Cornpropst To: freebsd-questions@freebsd.org Date: Sun, 21 Dec 2003 13:51:51 -0500 User-Agent: KMail/1.5.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312211351.51971.bsdguru@cox.net> Subject: Re: need example of ftp command X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: bsdguru@cox.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2003 18:52:40 -0000 On Sunday 21 December 2003 01:20 pm, fbsd_user wrote: > Need example of ftp command to login anonymous and download selected > file' > > I can not get this to work > > #! /bin/sh > cd /usr/packages/ > > path="pub/FreeBSD/ports/i386/packages-4.9-release/mail" > > ftp -a 'ftp://ftp2.FreeBSD.org/$path/qpopper-4.0.5_1' > > > using native interactive ftp, I can drill down to this > directory and get the file, so I know it's there and that's > the correct name, but I can not get the ftp > command in my script to work. Get error (not found or no access). Two things. The file you wish to retrieve is named qpopper-4.0.5_1.tgz, you left the file extension off the name. Second, you used single quotes in the ftp command line. This prevents the shell interpreter from translating $path. Use double quotes and fix the file name and this will work. Trevor Cornpropst