Here's a subset of the file names in my file:
profile_10_1_1
profile_10_1_2
profile_1_1_1
I'm trying to sort them numerically in ascending order, that is starting from 1 onwards. I used the following command
sort -n filename
and also tried this:
sort -nk filename
But the ones with 10 will always be at the top of the list.
How do I write a command to get this desired output:
profile_1_1_1
profile_1_1_2
....
profile_9_1_1
....
profile_10_1_1