aboutsummaryrefslogtreecommitdiff
path: root/scripts/sleepsort
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-04-28 13:18:49 +0000
committerEuAndreh <eu@euandre.org>2019-04-28 13:18:49 +0000
commit4a73dca595e57751448899053cddb958c17fe75c (patch)
tree8c1a0b9d997fc4a0531559f6b7e8102deae25f74 /scripts/sleepsort
parentUpdate os-installation.sh (diff)
parentSplit vagrant cmds. (diff)
downloaddotfiles-4a73dca595e57751448899053cddb958c17fe75c.tar.gz
dotfiles-4a73dca595e57751448899053cddb958c17fe75c.tar.xz
Merge remote-tracking branch 'srht/master'
Diffstat (limited to 'scripts/sleepsort')
-rwxr-xr-xscripts/sleepsort20
1 files changed, 0 insertions, 20 deletions
diff --git a/scripts/sleepsort b/scripts/sleepsort
deleted file mode 100755
index ea20fcb..0000000
--- a/scripts/sleepsort
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-# Taken from:
-# https://www.quora.com/What-is-the-strangest-sorting-algorithm/answer/Nipun-Ramakrishnan
-
-function f() {
- sleep "$1"
- echo "$1"
-}
-
-while [ -n "$1" ]
-do
- f "$1" &
- shift
-done
-
-wait
-
-# example usage:
-# sleepsort 5 3 6 3 6 3 1 4 7