当我尝试下载一个站点服务一个variables文件时,我遇到了这个问题
wget http://trac-hacks.org/changeset/latest/tracajaxcommentsplugin?old_path=/&filename=tracajaxcommentsplugin&format=zip
预期的文件
tracajaxcommentsplugin-r10913.zip而不是我得到一个文件tracajaxcommentsplugin\?old_path\=%2F与内容
<!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" ...
此问题不是特定于trac或此特定文件。
用单引号包装它:
$ wget 'http://trac-hacks.org/changeset/latest/tracajaxcommentsplugin?old_path=/&filename=tracajaxcommentsplugin&format=zip' -O tracajaxcommentsplugin-r10913.zip