Browsing through the Quora, I stepped upon this strange algorithm, which does what it is intended to do.
I believe the question was
What is the most strangest algorithm you have ever encountered?
What it’s doing is, it is iterating value passed to it and sleeping for the exact time. So, the lesser value will echo out first.
Save the above example in a sleepsort.bash and execute like below:
will result in :
Everything is awesome.