我在windows中使用wget,它与基本的http请求相当不错,但是当我运行下面的命令时,它基本上是snom手机上的动作URL。它没有运行它并给我链接下面的消息。有谁知道如何解决这个问题?
行动网址:
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: `dummy.htm@settings=save'
[ <=> ] 0 --.-K/s in 0s
2013-03-12 10:10:53 (0.00 B/s) - `dummy.htm@settings=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 :(得分:0)
&
字符in Windows是一个特殊字符,告诉shell在一行中执行多个命令。因此,您必须将您的网址用双引号括起来:
"http://Phone-IP-Address/dummy.htm?settings=save&setting_server=http://WEB-Server-IP/settings.xml&store_settings&=save"
这样,shell不会尝试将其作为命令的一部分进行解析,但会将其视为单个参数,单个字符串blob,因此&
个字符不会被视为命令分隔符......
它在Linux too中具有特殊含义:
&&
表示逻辑AND