i have a folder contails 3 types of files ,
ls -l
-rw-r--r-- 1 oratest dba 7 Jul 1 15:36 aml001.agl
-rw-r--r-- 1 oratest dba 7 Jul 1 15:36 aml002.agl
-rw-r--r-- 1 oratest dba 6 Jul 1 15:43 aml003.agl
-rw-r--r-- 1 oratest dba 7 Jul 1 15:36 bom001.agl
-rw-r--r-- 1 oratest dba 7 Jul 1 15:36 bom002.agl
-rw-r--r-- 1 oratest dba 7 Jul 1 15:44 bom003.agl
-rw-r--r-- 1 oratest dba 8 Jul 1 15:35 item001.agl
-rw-r--r-- 1 oratest dba 9 Jul 1 15:35 item002.agl
-rw-r--r-- 1 oratest dba 8 Jul 1 15:43 item003.agl
aml , bom , item
i want a script which sort the files by the number after the name,
i want to get the following result after the sort command:
-rw-r--r-- 1 oratest dba 7 Jul 1 15:36 aml001.agl
-rw-r--r-- 1 oratest dba 7 Jul 1 15:36 bom001.agl
-rw-r--r-- 1 oratest dba 8 Jul 1 15:35 item001.agl
-rw-r--r-- 1 oratest dba 7 Jul 1 15:36 aml002.agl
-rw-r--r-- 1 oratest dba 7 Jul 1 15:36 bom002.agl
-rw-r--r-- 1 oratest dba 9 Jul 1 15:35 item002.agl
-rw-r--r-- 1 oratest dba 6 Jul 1 15:43 aml003.agl
-rw-r--r-- 1 oratest dba 7 Jul 1 15:44 bom003.agl
-rw-r--r-- 1 oratest dba 8 Jul 1 15:43 item003.agl
all 001 files will be first , then 002 files and so
the number could be with 4 digits and 5 ...
thanks