#!/bin/bash #Formats every textfile in download-meta folder for file in download-meta/*txt; do echo "Formating $file" xmllint --format $file > $file.tmp && mv $file.tmp $file done #References: https://unix.stackexchange.com/questions/50198/reformatting-a-large-number-of-xml-files