Unsort

1.0 Public Domain    
5.0/5 1

  845 downloads

Unsort project is the natural opposite to standard 'sort', it takes lines and shuffles them.

description

download

specs

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.
read more   
Last updated on June 7th, 2007

#shuffle lines #unsort files #scuffle files #Unsort #shuffle #scuffle #shamble

0 User reviews so far.

SUBMIT