Search found 6 matches

by spodermon
28 Dec 2016 17:44
Forum: DOS Batch Forum
Topic: line numbers in find vs findstr
Replies: 10
Views: 12714

Re: line numbers in find vs findstr

Thanks aGerman! I found another workaround. I found that powershell counts the lines the same way findstr does, so I'm using it to print the lines I wanted to print. I added this to my script: powershell "get-content %1 | select -first !dife! -skip !portline!" Where !portline! is the first...
by spodermon
28 Dec 2016 14:16
Forum: DOS Batch Forum
Topic: line numbers in find vs findstr
Replies: 10
Views: 12714

Re: line numbers in find vs findstr

Forgot to attach file.
by spodermon
28 Dec 2016 12:55
Forum: DOS Batch Forum
Topic: line numbers in find vs findstr
Replies: 10
Views: 12714

Re: line numbers in find vs findstr

Thanks Sounak. I'm indeed looking for an easy solution, but I'm looking for something that can be run automatically, on the same script if at all posible The script I'm trying to do will extract information from these kind of source files, do some processing and give a csv file for easy reading, but...
by spodermon
28 Dec 2016 10:59
Forum: DOS Batch Forum
Topic: line numbers in find vs findstr
Replies: 10
Views: 12714

Re: line numbers in find vs findstr

Ok, so I went digging into the source file and I found one of the "problem lines". if I open the source file on notepad it looks ok, but if I open it in Notepad++ a "nul" icon is displayed. before this line both find and findstr match all the line numbers, after this line they ar...
by spodermon
28 Dec 2016 10:37
Forum: DOS Batch Forum
Topic: line numbers in find vs findstr
Replies: 10
Views: 12714

Re: line numbers in find vs findstr

Thanks Sponge Belly. I did as you suggested, and the output of the script find the line on 14320: c:\Temp\S>lineno match found on line 14320 as a test, I modified the script you shared to use 'find' instead 'findstr', and again its giving me a different result... (after the modification:) c:\Temp\S>...
by spodermon
27 Dec 2016 18:07
Forum: DOS Batch Forum
Topic: line numbers in find vs findstr
Replies: 10
Views: 12714

line numbers in find vs findstr

Hello everyone. After struggling for a little while with a batch that is printing the wrong lines I did some tests and found that for some reason 'find' and 'findstr' are giving me different line numbers for a specific line. Has anyone seen this? c:\Temp\S>type supportshow.txt | find /N "portsh...