Skip to content

Instantly share code, notes, and snippets.

@adiog
Created March 12, 2018 20:28
Show Gist options
  • Save adiog/d08409d7b72415100728f9f3d4cc08e3 to your computer and use it in GitHub Desktop.
Save adiog/d08409d7b72415100728f9f3d4cc08e3 to your computer and use it in GitHub Desktop.
sleepsort
#!/bin/bash
function f() {
sleep "$1"
echo -n "$1 "
}
while [ -n "$1" ]
do
f "$1" &
shift
done
wait
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment