On Tue, Sep 17, 2024 at 14:33:39 -0400, Steve Matzura wrote:
I want the output of the xmllint command to be put into a string variable.
I've tried braces, single- and double-quoting, parentheses, nothing works,
What you want is called "command substitution". There are two different
syntaxes for this: backticks (deprecated) and $( ).
myvariable=$( xmllint --whatever "$myfile" )
As others pointed out recently, there must NOT be any whitespace before
or after the = sign in a variable assignment.
The spaces that I put after $( and before ) are allowed, but not required.