Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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