PDA

View Full Version : Text Based Pattern Searching ? Help



Alibaba
05-25-2008, 06:48 PM
I have huge dump of txt files contains various unix based commands output. Now i have to read those logs.
Each text file give me similar pattern like this

+ cat /etc/passwd //command
Output...1
Output...2
Output...3

+ uname -a //command
Hostname

.
..
Now interesting is that fact all the command begin with the '+' symbol in the front. I want to interpret these file in such a way that the output comes to a html file where in i can just see the output being read from a text file into seperate table cells of a html page.
I have tried to work with search functions combined with reg ex . however i m unable to put a end criteria to the output.

I hope someone can help me in developing the code for this.