Stroller wrote:
On Apr 4, 2005, at 1:25 am, Grant wrote:
Looking a little closer at the output of 'wget -i links.txt' :
--17:14:20-- http://distfiles.gentoo.org/distfiles/sysvinit-2.86.tar.gz%20http:/ distro.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/sysvinit -2.86.tar.gz%20ftp:/ftp.cistron.nl/pub/people/miquels/software/ sysvinit-2.86.tar.gz%20ftp:/sunsite.unc.edu/pub/Linux/system/daemons/ init/sysvinit-2.86.tar.gz
=> `sysvinit-2.86.tar.gz'
Connecting to distfiles.gentoo.org[216.165.129.135]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
17:14:20 ERROR 404: Not Found.
In links.txt each of the paths for any given file are concatenated (correct usage?) with a space character, and wget is trying to fetch the entire string. Does anyone know how to make wget use this file properly?
$ sed 's/%20/ /'
http://distfiles.gentoo.org/distfiles/sysvinit-2.86.tar.gz%20http:/ distro.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/sysvinit -2.86.tar.gz%20ftp:/ftp.cistron.nl/pub/people/miquels/software/ sysvinit-2.86.tar.gz%20ftp:/sunsite.unc.edu/pub/Linux/system/daemons/ init/sysvinit-2.86.tar.gz
http://distfiles.gentoo.org/distfiles/sysvinit-2.86.tar.gz http:/distro.ibiblio.org/pub/Linux/distributions/gentoo/distfiles/ sysvinit-2.86.tar.gz%20ftp:/ftp.cistron.nl/pub/people/miquels/software/ sysvinit-2.86.tar.gz%20ftp:/sunsite.unc.edu/pub/Linux/system/daemons/ init/sysvinit-2.86.tar.gz
Please trim your postings,
Stroller.
-- gentoo-user@gentoo.org mailing list
Each line in your links.txt is a list of different mirror urls for the same package separated by '%20'.
This should take the first link from every line and pass it to wget:
cat links.txt | sed -e 's/%20.*//' | xargs -n 1 wget
or alternatively:
sed -e 's/%20.*//' <links.txt >links1.txt
wget -i links1.txt
Eugene.
-- gentoo-user@gentoo.org mailing list