Created
October 9, 2020 10:10
-
-
Save cuotos/0b716bc9210223b94e559521781e894c to your computer and use it in GitHub Desktop.
funny sorting alg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function f() { | |
sleep "$1" | |
echo "$1" | |
} | |
while [ -n "$1" ]; do | |
f "$1" & | |
shift | |
done | |
wait | |
./sleepsort 5 3 6 3 1 7 8 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment