我正在尝试编写一个脚本,该脚本应该从xml文件中获取值。在shell脚本中找不到“错误”
下面是XML文件: -
`<manifestFile>
<productInformation>
<publicationInfo>
<pubID pcsi-selector="P.S.">PACODE</pubID>
<pubNumber/>
</publicationInfo>
</productInformation>
</manifestFile>`
和我在我的代码是 : -
#!/bin/sh
Manifest=""
Manifest= `/bin/grep 'pcsi-selector="' /LDCManifest.xml | cut -f 2 -d '"'`
echo $Manifest
我希望我的结果是附: ,但它一直抛出错误为: -
./abc.sh: P.S.: not found
我是新来的shell,我无法弄清楚这是什么错误?
PS:不是可能会发现手段shell认为它是一个命令。 – Pieter21 2014-09-01 20:08:59