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.

Arrange numbers

Old posts that have not been replied to for several years.
Locked
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Arrange numbers

Post by Xpert »

Hello,
I have a txt file with lines like:
34 Xpert
708 Skipper
24 skin
4001 yusi
etc'.
And i want to arrange the numbers from the biggest one to the smallest one, like this:
1. yusi: 4001.
2. Skipper: 708.
3. Xpert: 34.
4. skin: 24.
etc' for all the numbers in the txt file.

Anybody has an idea? thx :)
Xpert.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

See the manpages for "lsort"..

(Hint: see either the "index" or the "command" parameters, and "decreasing").
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

Found it, 10x alot :P
Last edited by Xpert on Sat May 08, 2004 4:16 am, edited 1 time in total.
Xpert.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

As long as you have both data in the same list, it will keep them that way.
Again, read the hint that I gave.
Locked