i am looking for a way to sort the results of find returning a number of directories correctly for further processing in a bash script. since filenames can\'t conta
find
Use the -z option to sort zero-terminated data sets:
-z
sort
find ./ -maxdepth 1 -type d -iname 'xyz?' -print0 | sort -z | tr '\0' '\n'