in reply to random search in file
Give us a little more to go on. Have you multiple searches to do? How big is the file? Are the lines fixed length? Is the search time critical? What is the likely life time of the script?
Unsurprisingly this is a fairly frequently asked question so Super Search is your friend. A couple of searches turns up Specified Line Searching in file! and Picking Random Lines from a File (among many other nodes) that may be of help.
|
|---|