On 16/05/2011 12:38, no.top.post / gmail.com wrote:
> awk&stuff can "give me the the Nth element",
> but, without writing your own search-loop,
> what can "give me the index of the 'element'
> which is<elementValue>" ?
>
> I think it's called 'reverse indexing' ?
>
> == TIA.
>

Why not write your own loop?  Use your favourite scripting language. 
You haven't described your problem very well, but my guess it is should 
be easy to do in a perl or python script (read in the file, put the data 
through lists, hashes/dicts, sorts, etc., as needed).

I don't know enough about awk or ruby to say if they can handle it easily.