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-datawget 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 に答える