【发布时间】:2019-04-02 23:54:29
【问题描述】:
我想使用 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
【问题讨论】:
-
无论是从您的标签还是从您的命令中,都无法清楚您使用的是什么环境。在 cmd.exe 中,字符
<>|&必须用插入符号^转义或用双引号括起来。 windows wget、cat、sed默认不可用。
标签: windows shell batch-file command