[Script] Reformat log files to legible html

I wanted to view my game logs in a more viewing-friendly way than html-ish, so I made a bash one-liner which adds linebreaks and a sensible background color.
- Code: Select all
for file in *.txt; do cat "${file}"|sed ':a;N;$!ba;s/\n/\<br \/\>\n/g;s/\<body\>/body bgcolor\=\"\#222222\"/g' > "${file%%.*}.html"; done