4chan genius sorting algorithm: sleep sort
Man, am I a genius. Check out this sorting algorithm I just invented.
#!/bin/bash
function f() {
sleep "$1"
echo "$1"
}
while [ -n "$1" ]
do
f "$1" &
shift
done
waitexample usage:
./sleepsort.bash 5 3 6 3 6 3 1 4 7
via dis.4chan.org
Könnyes szemmel felröhögtem. És persze az egész thread.