Right now this outputs the value I need on stdout. How can I capture it into a variable so I can use it in the rest of the script?
Requirements:
This seems to work (based on Ignacio's answer). By using a subshell the here-document is correctly piped into xsltproc while still being passed through tail after.
VERSION=$((xsltproc - ../pom.xml | tail -1) << EOF EOF )