#!/bin/bash for a do xmllint --format $a -o $a done exit 0http://www.slightlytallerthanaverageman.com/2008/10/14/auto-formatting-xml-files/