need example of ftp command

Trevor Cornpropst bsdguru at cox.net
Sun Dec 21 10:52:40 PST 2003


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



More information about the freebsd-questions mailing list