perl -ne 's/(<\/\w+>)/$1\n/g; print; ' test