How do I customize character sort order?

Seems that sort command could provide some help.

-t, --field-separator=SEP

use SEP instead of non-blank to blank transition

-k, --key=POS1[,POS2]

start a key at POS1 (origin 1), end it at POS2 (default end of line)

ls -lAr|sort -t . -k2
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:35 a
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:35 b
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:36 c
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:36 d
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:38 A
-rw-r--r-- 1 CRM CCRM 0 Jan 20 10:34 .a
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:36 .A
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:38 .b
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:36 .B
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:36 .C
-rw-r--r-- 1 CRM CCRM 0 Jan 20 09:36 .D

Tags:

Linux

Ls

Sort