I've run into this a few times when a site serves a variable file i try to download

wget http://trac-hacks.org/changeset/latest/tracajaxcommentsplugin?old_path=/&filename=tracajaxcommentsplugin&format=zip

Expected file

tracajaxcommentsplugin-r10913.zip instead I get a file tracajaxcommentsplugin\?old_path\=%2F with content

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" ...

This problem is not specific to trac or this pecific file.

link|improve this question

53% accept rate
feedback

1 Answer

up vote 2 down vote accepted

Wrap it with a single quote:

$ wget 'http://trac-hacks.org/changeset/latest/tracajaxcommentsplugin?old_path=/&filename=tracajaxcommentsplugin&format=zip' -O tracajaxcommentsplugin-r10913.zip

link|improve this answer
On XP and the like, wrap the command in a double quote to get the same result. – RobW Dec 1 '11 at 22:54
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.