1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh DIR=. if [ "x$1" != "x" ] then DIR="$1" fi echo "<variablelist>" for I in `find $DIR -type f -name '*.xml' -mindepth 2 | sort -t/ -k3 | xargs` do echo "<xi:include href='$I' parse='xml'/>" done echo "</variablelist>"