Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 2003 13:51:51 -0500
From:      Trevor Cornpropst <bsdguru@cox.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: need example of ftp command
Message-ID:  <200312211351.51971.bsdguru@cox.net>
In-Reply-To: <MIEPLLIBMLEEABPDBIEGCEGBFBAA.fbsd_user@a1poweruser.com>
References:  <MIEPLLIBMLEEABPDBIEGCEGBFBAA.fbsd_user@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312211351.51971.bsdguru>