2013-03-12 283 views
1

我在windows中使用wget,它對基本的http請求工作得很好,但是當我運行下面的命令時,基本上這是snom手機上的一個動作URL。它不會運行它並在鏈接下給我提示信息。有誰知道如何解決這個問題?在windows的批處理文件中運行wget命令行

動作網址:

http://Phone-IP-Address/dummy.htm?settings=save&setting_server=http://WEB-Server-IP/settings.xml&store_settings&=save 

結果

syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc 
--2013-03-12 10:10:53-- 
Connecting to `192.168.1.100:80`... connected. 
HTTP request sent, awaiting response... 200 Ok 
Length: 0 [text/html] 
Saving to: `[email protected]=save' 

[ <=>         ] 0   --.-K/s in 0s 

2013-03-12 10:10:53 (0.00 B/s) - `[email protected]=save' saved [0/0] 

'setting_server' is not recognized as an internal or external command, operable program or batch file. 
'store_settings' is not recognized as an internal or external command, operable program or batch file. 

回答

0

&字符in Windows是一個特殊字符告訴殼在一個行到執行多條命令。所以,你必須附上網址在雙引號:

"http://Phone-IP-Address/dummy.htm?settings=save&setting_server=http://WEB-Server-IP/settings.xml&store_settings&=save" 

這種方式,外殼不會嘗試分析它作爲命令的一部分,但將把它作爲一個參數,字符串的單個斑點,因此&字符不被視爲命令分隔符太...

它在Linux too特殊的意義:

  • 一個人會異步運行的命令,在後臺
  • &&意思是邏輯AND