littleIdiot
MIS
Hi,
I have a series of files on disk that I am trying to list sorted by the 1st, then the 3rd field (field delim being a full stop/period ".")
For example:
C00014403.txt.1
C00014403.txt.2
C00014403.txt.3
C00014403.txt.4
C00014403.txt.5
C00014403.txt.6
C00014404.txt.1
C00014404.txt.2
C00014404.txt.3
C00014404.txt.4
C00014404.txt.5
C00014404.txt.6
I have no control over the file extension, so canot make it 001, 002, and these increment upto 200+.
I have tried using the sort command as follows:
ls -l | sort -t . -k 1.2n,3n
But this is not working.
How can sort my files so that they display as I want them to?
I can not use the time stamp either.
Any ideas?!
Thanks,
littleIdiot
I have a series of files on disk that I am trying to list sorted by the 1st, then the 3rd field (field delim being a full stop/period ".")
For example:
C00014403.txt.1
C00014403.txt.2
C00014403.txt.3
C00014403.txt.4
C00014403.txt.5
C00014403.txt.6
C00014404.txt.1
C00014404.txt.2
C00014404.txt.3
C00014404.txt.4
C00014404.txt.5
C00014404.txt.6
I have no control over the file extension, so canot make it 001, 002, and these increment upto 200+.
I have tried using the sort command as follows:
ls -l | sort -t . -k 1.2n,3n
But this is not working.
How can sort my files so that they display as I want them to?
I can not use the time stamp either.
Any ideas?!
Thanks,
littleIdiot