Looking for results in bash is always sorted by file name in ascending order?

I have code that depends on the fact that (so far) I get the results, being in cygwin in ascending order.

Is this always the case, or do I need to be careful about any other "variables" to make sure that I get this result as on Windows / Linux, regardless?

thank

+3
source share
1 answer

Firstly, it bashis your shell (command line interpreter) and does not sort. Inside bashyou call find. The command finddoes not sort. For a sorted result on sort:

find ... | sort
+5
source

Source: https://habr.com/ru/post/1768792/


All Articles