Manual Reference Pages - BOGOSORT (1)
bogosort - sorts or doesnt sort files or standard input
Jargon File Entry
bogosort sorts files or its standard input using the bogo-sort
(I wont even bother to dream up some bogus advantages here.)
If any files are given input is taken from files in stead of standard
It can also just randomise the lines in its input,
allowing you to perform your own check in a loop.
bogosort accepts the following options:
-n, --nosort |
Dont check if the output is sorted, just exit after permuting the lines once.
-r, --norandom |
If configured with support for /dev/(u)random dont try to read /dev/(u)random
for seeding rand, ignored otherwise.
-s, --seed number |
Use number to seed rand.
-o, --output name |
Write output to name instead of standard output.
-h, --help |
Show summary of options.
-v, --verbose |
Output a . (dot) to standard error for each permutation of the lines,
and send some non critical error messages to standard error.
-V, --version |
Show version of program.
JARGON FILE ENTRY
The following section is taken from the Jargon File.
...The archetypical perversely awful algorithm (as
opposed to bubble sort,
which is merely the generic bad algorithm).
Bogo-sort is equivalent to repeatedly throwing a deck of
cards in the air,
picking them up at random,
and then testing whether they are in order.
It serves as a sort of canonical example of awfulness.
Looking at a program and seeing a dumb algorithm,
one might say
Oh, I see, this program uses bogo-sort.
Esp. appropriate for algorithms with factorial or super-exponential
running time in the average case and probabilistically infinite
worst-case running time.
Compare bogus, brute force, lasherism...
This program is intentionally bogus.
Jargon File <http://www.tuxedo.org/~esr/jargon/>.
Ulrik Haugen <firstname.lastname@example.org>.
|--> ||BOGOSORT (1) ||august 9, 2000 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.