|
Answer» hi GUYS, i have to search two words in a log file like as follows LOG FILE looks like: ............... .................... 2007 Mar 16 15:37:18:156 GMT +5 BW.SiebelServices-SiebelServices DEBUG [BW-User] - EAI-DEBUG |TPP_APPLICATION|1598352|Siebel_Dispatcher_Main |PROC1006|Process started.. Input Siebel XML Data:
79909
1-T20-152 03
01
............... .................... i will be searching for two words that i made in bold one is static (Siebel_Dispatcher_Main) and other is dynamic (i.e in the orderid tag.....) My requirement is fetch the line from Siebel_Dispatcher_Main till the first occurence of the orderid that i will pass....
Thanks in Advance Jothishmy advice is not using batch to do such file processing. (though it still can be done) you can use vbscript if you know it, or other better LANGUAGES that can do better file processing. If you can use GNU awk, Gawk, the solution is as simple as... Code: [Select]awk '/Siebel_Dispatcher_Main/,/<\/OrderId>/ {print }' file Thanks YAR........the thing is i am doing this in client machine so they wont give permission to install? Help me in doingthis in batch commands
Thanks in Advance Jothish
|