Amazon Interview Question

a bash scripting question to manipulate folder content, a problem which requires a sorting algorithm.