I have a list of directories based on the results of running the \"find\" command in bash. As an example, the result of find are the files:
test/a/file test/b/fi
If you want to sort alphabetically, the best way is:
find test -print0 | sort -z
(The example in the original question actually wanted files before directories, which is not the same and requires extra steps)