mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2003
Posts: 34
S
spling Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2003
Posts: 34
I need to find the top ten variables in a hash table. Could I use a filter and a loadbuf to do this? How would I do it. I haven't use either command before, and they're both complicated O_o
Thanks in advance.

Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
It's not too complicated, you can use /hsave -n to save all data values in the hash table to a file. After saving use /filter to sort it, /filter -ctffeu 1 10 file file where it sorts the lines numerically (looking at the whole line since chr 10 was specified as the token separator and it cannot exist in a line) in descending order

Now the highest data value is the first line of the file, you can use $hfind to refer back to the data item/s


Link Copied to Clipboard