天才de睡眠排序算法

#!/bin/bash
function f() {
    sleep "$1"
    echo "$1"
}
while [ -n "$1" ]
do
    f "$1" &
    shift
done

使用方法

./sleepsort.bash 5 3 6 3 6 3 1 4 7

ref:http://dis.4chan.org/read/prog/1295544154