I have a valid xml file which contains something like:
<ConfigSettings>
<pairs>
<p>
<Name>InstallDirectory</Name>
<Val>/Library/Application Support/Home</Val>
</p>
... other pairs follow ...
On the command line the following works to return the correct <Val> string:
echo 'cat /ConfigureSDK/ConfigSettings/pairs/p[Name="InstallDirectory"]/Val/text()' | xmllint --shell initsdk.xml | grep -v "^/ >"
However, when I try to assign the result to a variable within a script, e.g.,
ABC='cat /ConfigureSDK/ConfigSettings/pairs/p[Name="InstallDirectory"]/Val/text()' | xmllint --shell initsdk.xml | grep -v "^/ >"
then try
echo $ABC
nothing is printed.
I'm sure I'm missing something simple, but I have tried many variations to no avail.
Thanks for any help.