This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Ordening a text file

Old posts that have not been replied to for several years.
Locked
V
Vingo

Ordening a text file

Post by Vingo »

Hya guys,

my bot register specific things in a text file (when pple type a specific trigger, the time stayed on an ftp,...). All this sort of things are kept in one file (maybe i can separate them...and make one file for the triggers typed, one file for the time stayed on a ftp,... to make things easier)

example what i get in the text file till now:
John typed trigger of "Max"
Delta typed trigger of "Zeron"
Delta typed trigger of "Max"
John typed trigger of "Ringo"
Detla stayed 13 min on ftp "Max"
Delta stayed 14 min on ftp "Zeron"
Delta typed trigger of "Max"
Delta stayed 5 min on ftp "Zeron"

Now i would like to get this file a little ordered.
For example, the same ones that appear more then once, i would like to get a number behind it, so that when i wanna make statistics (by typing a certain command), the bot will order the file again and will tell me when typing that specific command:
Delta typed trigger of "Max" 2 (times) (here he increased the previous one with 1)
Delta stayed 19 min on ftp "Zeron" (so here he has to increase the previous time with the new time)
....
(so i would like that the bot take the same ones all together (group them) and make a total for that ones (this is for times and for number of triggers typed)

Can some1 help me plz with creating such a sort of script?

Thnx a lot!

Cheers,
Vingo
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Try searching the forum. We just made a file sort script!
Locked