Saved Bookmarks
| 1. |
Solve : Search for a text string in a file ...? |
|
Answer» I would like the search a specify string in a FILE. I would like the search a specify string in a file.pls read again the help for find. what does /v stands for. You want to get lines with "error" right?Thanks . i think in my case i should use /C in my situation. Also, when i has 2 lines has error it show c:\a.txt: 2 And my next question is how can i capture the "2" as a parameter, because i NEED to echo this to other file. Many thanksuse the for LOOP. set tokens, delims=: and let the for loop parse the output of the find command. then you can capture the output you want. I am sure if you do a search in this FORUM, you can find examples. |
|