Streaming editor improved
14 January 2009
I recently ran into the situation that I needed a streaming editor which does not work line-wise. I was receiving an html stream and wanted to remove all the html tags.
Although I tried different existing editors like sed or replace, non of it got it right for me. All implementations waited for a newline to work with the data. I also tried disabling every possible buffer but the problem still persists.
So after quite some trial and error I started writing my own little program which could do the job. So here is the code:
Just compile it with the following statement and it will filter everything which comes from stdin.
Here is a sample statement of how to use it: