Skip to content

Instantly share code, notes, and snippets.

@vortec
Created October 13, 2014 13:59
Show Gist options
  • Save vortec/54c8bc693bce127d295f to your computer and use it in GitHub Desktop.
Save vortec/54c8bc693bce127d295f to your computer and use it in GitHub Desktop.
#!/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