Advertisement
Deerenaros

Sleep Sort

Mar 26th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.14 KB | None | 0 0
  1. #!/bin/bash
  2. function f() {
  3.     sleep $(echo "$1 / 1000" |bc -l)
  4.     echo "$1"
  5. }
  6. while [ -n "$1" ]
  7. do
  8.     f "$1" &
  9.     shift
  10. done
  11. wait
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement