Skip to content

Instantly share code, notes, and snippets.

@matlinuxer2
Created November 24, 2011 13:16
Show Gist options
  • Save matlinuxer2/1391322 to your computer and use it in GitHub Desktop.
Save matlinuxer2/1391322 to your computer and use it in GitHub Desktop.
timely random
#!/usr/bin/env bash
function test_num(){
sleep $(( $RANDOM % 5 ))
echo $i
}
function echo_num(){
for (( i=1; i<=49; i++ ))
do
test_num &
done
}
for x in $( echo_num |tail -7)
do
echo -n "$x "
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment