#!/bin/bash VERSIONS="" for F in `find bin -name ModInfo.xml | sort` do xmlstarlet sel -T -t -v /xml/DisplayName/@value -o ": " -v /xml/Version/@value -n $F VERSIONS="${VERSIONS}`xmlstarlet sel -T -t -v /xml/Version/@value $F`_" done VERSIONS=${VERSIONS:0:-1} echo "Combined: $VERSIONS"