c# - log parser 2.2 query, Text parsing and validating -


there simple text file have parse using log parser. started using log parser not understanding parsing limit. mean can such thing using logparser

textline parse:

1022303name      wxp3

this have parse like

first digit 1 row name
next 3 digit 022 errornumber
next 3 digit 303 userid
next ten char name username
next 4 char wxp3 systemname

i not able understand can query log parser or not... if yes give sample query.

any other tool perform welcomed

you want substr function.

logparser -i:textline "select substr(text, 0, 1) rowname, substr(text, 1, 3) errornumber, substr(text, 4, 3) userid, substr(text, 7, 10) username, substr(text, 17, 4) systemname temp.txt 

this assumes lengths set particular size.

temp.txt text used above:

1022303name1     wxp3 1022303name 2    wxp4 1022303name 3    wxp5 1022303name 4    wxp6 1022303name 5    wxp7 1022303name 6    wxp8 1022303name 7    wxp9 1022303name 8    wxpa 

since it's been linked before, i'll point log parser plus, 'run,' , may of other log parser functions.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -