Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
JMinara
Beginner


Joined: 05 Jul 2005
Posts: 14

PostPosted: 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
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: 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!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net