html - Wget recognizes some part of my URL address as a syntax error -


i quite new wget , have done research on google found no clue.

i need save single html file of webpage:

wget yahoo.com -o test.html 

and works, but, when try more specific:

wget http://search.yahoo.com/404handler?src=search&p=food+delicious -o test.html 

here comes problem, wget recognizes &p=food+delicious syntax, says: 'p' not recognized internal or external command

how can solve problem? appreciate suggestions.

the & has special meaning in shell. escape \ or put url in quotes avoid problem.

wget http://search.yahoo.com/404handler?src=search\&p=food+delicious -o test.html 

or

wget "http://search.yahoo.com/404handler?src=search&p=food+delicious" -o test.html 

in many unix shells, putting & after command causes executed in background.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -