0
我試圖用xmlstarlet插入一個新元素,但是當我運行該命令時,它只是列出了我試圖插入到的xml文件。任何建議都會很棒。xmlstarlet編輯插入語法
xml ed -s /chkSys/machine/registry -t elem -n key -v "" -i /registry/key -t attr -n value -v "'C:\Program Files\Microsoft SQL Server'" -v path "HKLM\software\symantec\Symantec Endpoint Protection\AV\Exclusions\ScanningEngines" --net \\server3\e$\temp\chksys\chksys.xml
##Old##
<?xml version="1.0" encoding="utf-8"?>
<chksys>
<machine>
<registry>
</registry>
</machine>
</chksys>
##New##
<?xml version="1.0" encoding="utf-8"?>
<chksys>
<machine>
<registry>
<key value="'C:\Program Files\Microsoft SQL Server'" path "HKLM\software\symantec\Symantec Endpoint Protection\AV\Exclusions\ScanningEngines\Directory\Admin\1075182566\DirectoryName"/>
</registry>
</machine>
</chksys>