I need to order these file names (and I can't change them):
- file_31_stable.sql
- file_32_stable.sql
- file_310_stable.sql
- file_41_stable.sql
- file_42_stable.sql
- file_410_stable.sql
This is also the expected order that I want to display them, because I have to get the last one.
When I use the command
find ./databases/ -iname file_*.sql | sort -V
The output is this:
file_31_stable.sql
file_32_stable.sql
file_41_stable.sql
file_42_stable.sql
file_310_stable.sql
file_410_stable.sql
There is a form to order using the first number of the file and then the rest, or a command that will display the expected order?