Batch Error: “< was not expected at this time”
Batch Error: “< was not expected at this time”
我想使用 Ptexport 从 http 服务器获取信息,但我无法输入正确的语法。
我尝试过不同类型的语法。
wget.exe --user=export_kpi --password=kpi123 -O Result3.txt http://XX.YYY.CCC.BB/export/Export?req='<Ptexport version="1.6.0"><Request><ResultReq egname="test_kpi" templRR1="kpi_lost">'**
我明白了
< 不符合预期
我应该像这样获取 .txt 文件:
cat Result3.txt |sed 's/></>\n</g'
<Ptexport version="1.6.0" >
<Response>
<RR cid="1459546492000" sid="33966" eod="0">
<RR1 direction="0" statTime="1552888534574" dmax="400" />
<RR1 direction="1" statTime="1552888534574" dmax="413" />
<RR1 direction="0" statTime="1552888594575" dmax="466" />
<RR1 direction="1" statTime="1552888594575" dmax="487" />
<RR1 direction="0" statTime="1552888654575" dmax="371" />
<RR1 direction="1" statTime="1552888654575" dmax="427" />
</RR>
<RR cid="1459546492000" sid="33968" eod="0">
..etc
用双引号将您的 url 括起来,如下所示
wget.exe --user=export_kpi --password=kpi123 -O Result3.txt "http://XX.YYY.CCC.BB/export/Export?req='<Ptexport version=,\"1.6.0\"><Request><ResultReq egname=\"test_kpi\" templRR1=\"kpi_lost\">'**"
不要在 URL 中输入文字 <
。请改用 %3C
。
我想使用 Ptexport 从 http 服务器获取信息,但我无法输入正确的语法。
我尝试过不同类型的语法。
wget.exe --user=export_kpi --password=kpi123 -O Result3.txt http://XX.YYY.CCC.BB/export/Export?req='<Ptexport version="1.6.0"><Request><ResultReq egname="test_kpi" templRR1="kpi_lost">'**
我明白了
< 不符合预期
我应该像这样获取 .txt 文件:
cat Result3.txt |sed 's/></>\n</g'
<Ptexport version="1.6.0" >
<Response>
<RR cid="1459546492000" sid="33966" eod="0">
<RR1 direction="0" statTime="1552888534574" dmax="400" />
<RR1 direction="1" statTime="1552888534574" dmax="413" />
<RR1 direction="0" statTime="1552888594575" dmax="466" />
<RR1 direction="1" statTime="1552888594575" dmax="487" />
<RR1 direction="0" statTime="1552888654575" dmax="371" />
<RR1 direction="1" statTime="1552888654575" dmax="427" />
</RR>
<RR cid="1459546492000" sid="33968" eod="0">
..etc
用双引号将您的 url 括起来,如下所示
wget.exe --user=export_kpi --password=kpi123 -O Result3.txt "http://XX.YYY.CCC.BB/export/Export?req='<Ptexport version=,\"1.6.0\"><Request><ResultReq egname=\"test_kpi\" templRR1=\"kpi_lost\">'**"
不要在 URL 中输入文字 <
。请改用 %3C
。