Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vijayanandrp/183ed79ed18cd227d329e9bb3d671bf9 to your computer and use it in GitHub Desktop.
Save vijayanandrp/183ed79ed18cd227d329e9bb3d671bf9 to your computer and use it in GitHub Desktop.
Easy way to implement interesting Sleep Sorting Algorithm using Bash
#!/bin/bash
function f() {
sleep "$1"
echo "$1"
}
while [ -n "$1" ]
do
f "$1" & shift
done
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment