I tried
var = $(xmllint --xpath 'string(//datatype)' dataReport_2.xml)
which seems not to work.
It only stores a string value of this whole command into a variable. Is there any way to store this value into a variable?
I tried
var = $(xmllint --xpath 'string(//datatype)' dataReport_2.xml)
which seems not to work.
It only stores a string value of this whole command into a variable. Is there any way to store this value into a variable?
You can't put spaces or any kind of white-space characters around =
, so try this:
var=$(xmllint --xpath 'string(//datatype)' dataReport_2.xml)