#!/bin/bash for i in `ls output*.xml` do perl -pi -e 's/^()/$1."\n".`xsltproc $i`/e' prova.html done