[CentOS] escape .c files to html code with bash how?

Mon Oct 18 16:34:18 UTC 2010
Jozsef Vadkan <jozsi.avadkan at gmail.com>

i need to encode .c files to html, like on this website:

http://centricle.com/tools/html-entities/

i tried to write a bash script for it:

http://pastebin.com/raw.php?i=mZKAw4c5

but it's not working very well :D

does anyone has a script, that does this?

thank you :\