|
JMinara Beginner
Joined: 05 Jul 2005 Posts: 14
|
Posted: Thu Apr 20, 2006 7:07 am
Request: Funct to search file for string and return line # |
I know about %grep, and it's almost what I need, except it returns the value of the line/the lines with it, instead of the line numbers.
Something that functioned the same as grep but put the line numbers into a list instead of the line values, would be absolutely exquisite.
And yes, I know I could loop through the text file and search for the data but that's horribly horribly kludgish and if the file is big it'll be sucky :P |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Apr 20, 2006 2:37 pm |
Another option, but admitted also a bit of a kludge, is to add your own line numbers to the files.
|
|
_________________ Asati di tempari! |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|