On 15/06/12 19:50, Linda Walsh wrote: > 0000 > well -- the http address is 80 characters long -- > some of the base's pathname chars had shell unfriendly > chars in them -- to the point that I *had* to put the base URL into > a file and not on the command line (kept running into quoting > problems)... > > The filenames were relatively simple (foo.rpm... x.rpm...etc...).. > Try your example with > base="http://download.openproject.org/repositories/devel:/languages:/perl/openproject_Factory/src/?release=alpha1.0&lang=en&encoding=binary&source=" > and files = package?arch=x86_64&fmt=rpm,name=package1 > package?arch=no_arch&fmt=rpm,name=package2, ... > > Expand that in a shell... and it doesn't work so well... Are you sure? :)
wget "http://download.openproject.org/repositories/devel:/languages:/perl/openproject_Factory/src/?release=alpha1.0&lang=en&encoding=binary&source="{"package?arch=x86_64&fmt=rpm,name=package1","package?arch=no_arch&fmt=rpm,name=package2"} > Not to mention, doing 10 lines at a time make the lines expand to > over 1360 chars (because the base is 136 chars by itself > exclusive of wget options and the file names... > > Many times, I've had a long URL name that I want to set, then just > enter filenames relative to that base. > and with the base being complicated -- I just want to put it in a > file...) > > I don't see why putting filenames on the command line ignores the -B > switch?? > > I.e. -- what is the purpose served by ignoring a "B" switch the user > specifies on the command > line when they fetch files? Is there a benefit to it being ignored? How is it failing? (echo "package?arch=x86_64&fmt=rpm,name=package1"; echo "package?arch=no_arch&fmt=rpm,name=package2" )> file wget -B "http://download.openproject.org/repositories/devel:/languages:/perl/openproject_Factory/src/?release=alpha1.0&lang=en&encoding=binary&source=" -i file Tries to download: - http://download.openproject.org/repositories/devel:/languages:/perl/openproject_Factory/src/package?arch=x86_64&fmt=rpm,name=package1 - http://download.openproject.org/repositories/devel:/languages:/perl/openproject_Factory/src/package?arch=no_arch&fmt=rpm,name=package2 Adding another url to the end, just downloads one more url. > So I wanted to put the base in a file and just use -B "$(<base)", and > put the filenames at the end. -- and not use > the shell but use 'parallel', which spawns processes directly, so I > don't have to worry about expansion -- > (I could have it do expansion by running it with bash -c "command", > but if expansion is causing a problem > its a bonus not to incur running a command shell with each iteration).... echo "http://download.openproject.org/repositories/devel:/languages:/perl/openproject_Factory/src/?release=alpha1.0&lang=en&encoding=binary&source=" > base wget -B $(<base) -i file works too
