Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download XML web page with Wget

Tags:

unix

wget

I want to download an XML from the web using Unix wget. In principle to simple get it and save it into a file.

This is the command I use:

wget http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=Alum+AND+Adjuvant&retmax=100 --output-document=test.xml

But if failed to download it. What's the right way to go?

like image 767
neversaint Avatar asked Jan 22 '13 10:01

neversaint


1 Answers

if the --output-document does not work, you can use the -O

wget -O test.xml
    "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=Alum+AND+Adjuvant&retmax=100"
like image 120
kapaweb Avatar answered Nov 27 '22 20:11

kapaweb