4

我正在为 Windows 使用 wget,我想指定一个--post-data过滤器(并避免使用--post-file过滤器),但我正在努力让它工作。这可能是因为双引号中有这样的字符串:

wget "http://www.somesite.com/wfs" --header="Content-Type: text/xml; charset=UTF-8"
--user=username --password=password --no-check-certificate
--post-data="big long string with "quotes" in it" --output-document=C:\Test.xml

有没有其他人成功地--post-data在 wget for Windows 中工作?我错过了什么吗?

干杯

安迪

4

2 回答 2

8

您可以通过在大长字符串中添加前缀来转义引号,\例如

--post-data="big long string with \"quotes\" in it"
于 2009-08-06T07:38:18.067 回答
3

在引号内也使用双引号:

--post-data="big long string with ""quotes"" in it"
于 2012-11-07T12:48:19.883 回答