I need to search a file from bottom to top so to speak, varying the
search each time it matches (thus, the reason why I don't just grep
it). I'm wondering not exactly *how* to do this, but the best way.
So far, I see two ways - load up the whole file, reverse it, and then
proceed as if it were normal, or, search the whole file for my string,
use the last match to get the next search, and so on and so forth.
Currently, I'm working with perl, but I may later redo it in C.
These methods both seem more than a little inefficient, and I wonder
if there isn't a better way, or if not, at least which one of these
two is best... The first runs into memory problems, but the second
seems like quite a waste too.
Thanks for your thoughts,
Se quest'email e` in Italiano, mi dispiace per gli errori:-) FORZA PANTANI!