Suppose you have the html file, test.html, which you want to, er, compress, how about this?
Code:
tr -s '\n' @ <test.html | sed 's/>@</></g' | tr '@' '\n'
There are many other ways to do this. But, are you ready to sacrifice readability for a few bytes? I mean, there's no compression being done. You're saving nearly nothing. If it's a 1000 line HTML file, you'd be saving a maximum of about 1KB. Is it worth it?
Anyway, to be safer, so that an @ in the html file itself does not cause any problems, try this:
Code:
tr -s '\n' '\200' <test.html | sed 's/>\o200</></g' | tr '\200' '\n'
Arvind