Как я могу использовать переменные в качестве входных данных для команды xmlstarlet validate?
Вот полный пример:
read -r -d '' XML <<"EOF"
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catalog>
EOF
# emits a usage message, exits with status 2
xmlstarlet val -v . <<< "$XML"
# also emits a usage message and exits with status 2
xmlstarlet val -v - <<< "$XML"