Unsort 1.0

Unsort project is the natural opposite to standard 'sort', it takes lines and shuffles them.
Unsort project is the natural opposite to standard 'sort', it takes lines and shuffles them. I wonder how it is not part of every standard UNIX system. How the hell did they test 'sort'?

$ echo -e "1n2n3n4n5n7"|unsort
stderr> Using seed: 542941369
7
4
1
5
2
3
stderr> Jumps: 4 left, 4 right, balance: 1.000000

This 'unsort' implementation goes as follows:

reads lines from standard input
assigns them random, unique indexes
sorts lines by their random index
when input finishes, lines are dumped as sorted.

The only limitation I have found so far is about sheer size. The whole file is kept in memory while being sorted.

Compile and Install:

Simple build & install instructions can be found at the beggining of the file.

last updated on:
June 7th, 2007, 15:06 GMT
price:
FREE!
homepage:
gatopeichs.pbwiki.com
license type:
Public Domain 
developed by:
gatopeich
category:
ROOT \ Utilities
Unsort
Download Button

In a hurry? Add it to your Download Basket!

user rating 1

5.0/5
 

0/5

Rate it!

Add your review!

SUBMIT